I am using BinaryReader to read the bytes of an image, I am having some issues trying to read the ARGB values of a bitmap image using BinaryReader. Can anyone suggest a way I could get the byte value for each pixel in a bitmap image?
Thanks in advance
Easy way is to use unsafe context and lock some bits. Oversimplified sample:
However, if you still need to use BinaryReader and you know how many bytes per pixel there are, It is possible to just skip the header (you can find it's length in @Bradley_Ufffner 's link) and access the bytes.