I'm working in C# and I've got a question about the Bitmap.LockBits method. Let's say that I have a Bitmap called myBitmap and use LockBits on this bitmap:
BitmapData bmpData = myBitmap.LockBits(new Rectangle(0, 0, myBitmap.Width, myBitmap.Height), ImageLockMode.ReadOnly, PixelFormat.Format8bppIndexed);
In my limited understanding bmpData.Scan0 is a pointer to the image data, but is this the "actual image data" or some sort of copy (using just the data in the specified rectangle)? The reason I'm asking is that I can't figure out the purpose of the ImageLockMode enumeration. It seems to me that if I have the Scan0 pointer I can fiddle around and do all sorts of reads/writes to the image data (using for example Marshal.Copy) regardless of the choosen ImageLockMode.
Thank you for your time! Kind regards / Henrik