As Im coding in vb.net, I used that example and noticed the line "'
This code is specific to a bitmap with 24 bits per pixels." This
means that I can give the routine a 24bpp bmp and it will work but I
need to work with 32bpp bitmaps.
If you give the demo code on that page a 32bpp bmp, it crashes at the
line "System.Runtime.InteropServices.Marshal.Copy(ptr, rgbValues, 0,
bytes)" with the error "Attempted to read or write protected memory."
meaning that its probably going to the wrong place or read to far?
Does anyone know how to convert 32bpp bmp's to a byte array and could
maybe tell me how to make the code with with 32bpp bitmaps instead of
the 24bpp ones? (or why its crashing? ...or even if libs already
exist for this?)
Thanks for reading this post, even if your unable to help :)