C# 图像 24位转32位(真彩色):函数
public static Bitmap ConvertTo32bpp(Image img) {
var bmp = new Bitmap(img.Width, img.Height, System.Drawing.Imaging.PixelFormat.Format32bppRgb);
using (var gr = Graphics.FromImage(bmp))
gr.DrawImage(img, new Rectangle(0, 0, img.Width, img.Height));
return bmp;
}
原文链接:http://stackoverflow.com/questions/12572352/converting-32-bit-bmp-to-24-bit