dotnet / dotnet/dotnet-api-docs

Scan0 with partial lock

Open
#1,879 0 comments 0 reactions 0 assignees View on GitHub
area-System.Drawing dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

Scan0 behaves in mysterious ways when you don't lock the entire bitmap.

It will point at the top left corner of the locked region. You should only write data for the parts of the rows you locked. But each row that you should write to is separated by Stride number of bytes.

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: ccecca6b-4d3a-4b28-a10f-14815813886d
* Version Independent ID: 1a90c36c-f956-f3a5-677e-f3ff597f28a2
* Content: [BitmapData.Scan0 Property (System.Drawing.Imaging)](https://docs.microsoft.com/en-us/dotnet/api/system.drawing.imaging.bitmapdata.scan0?view=netframework-4.7.2)
* Content Source: [xml/System.Drawing.Imaging/BitmapData.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Drawing.Imaging/BitmapData.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.