How to load image in correct pixel depth

Posted by extropy on Stack Overflow See other posts from Stack Overflow or by extropy
Published on 2009-08-17T08:19:41Z Indexed on 2010/06/16 19:02 UTC
Read the original article Hit count: 186

Filed under:
|

I have a bunch of monochrome (1bpp) PNG images I want to load, and pass to pdfSharp.

Using Image.FromFile loads images fine, but it alawys uses 32BPP, regardless of the pixel depth of the file. That results in very large PDF files generated.

Is there a way to load images in their native pixel depth?

© Stack Overflow or respective owner

Related posts about .NET

Related posts about images