well, i wonder if one writes code to show a bitmap on a form.
Would it be possible to access it directly like an array in c#?
I am wondering this because the bitmap is already there in memory and on screen.
But I’m not sure on how to point to it; like it where a pointer or array so, I want to do this in c# and I also don’t know the array data structure on the form (like is it RGB BGR / RGB24 etc)
As a note, this image source isn’t from a file, it’s from a webcam.
Also, a reason I want to do this is because getpixel / putpixel is to slow for what I want.
If you want to get the image pixels in the array you can do it like this:
And when you change them you should copy that array back to the Bitmap using this:
But if you realy want to deal with pixels like you said, you should use some FastBitmap implementation. There are many other implementations available also.