8bit BPP is loaded as Format32bppArgb in C #
I have a raw 8 bit BPP TIF file when I do this:
Bitmap imag = new Bitmap(imgN)
then:
imag.PixelFormat.ToString()
I am getting Format32bppArgb where I should get 8 bits,
I tried to do:
AForge.Imaging.Image.Clone(imag, System.Drawing.Imaging.PixelFormat.Format8bppIndexed);
but i get
An unhandled exception of type "System.Exception" occurred in System.Drawing.dll Additional information: A Graphics object could not be created from an indexed pixel format image.
Perhaps I need to load it first into a byte array and then into a bitmap?
+3
source to share
No one has answered this question yet
Check out similar questions: