How to load image in correct pixel depth
- by extropy
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?