Load a bitmap from file in RGB format (without alpha)
Posted
by Robert
on Stack Overflow
See other posts from Stack Overflow
or by Robert
Published on 2010-05-30T22:19:24Z
Indexed on
2010/05/30
22:22 UTC
Read the original article
Hit count: 265
Hi, i simply want to load a .BMP file and get the Bitmap object in 24bit RGB format (or 32bit in RGB format).
All methods I tried return a Bitmap/Image object with PixelFormat = Format32bppArgb. Even if of course BMPs don't have alpha.
new Bitmap(System.Drawing.Image.FromFile(fileName, true));
new Bitmap(fileName);
I currently solve the problem by copying the first object to another in memory bitmap at 24bit RBG.
Is there a single method to do it?
Thanks
© Stack Overflow or respective owner