// 将图片PixelFormat其它格式转为Format32bppArgb格式
void ToFormat32bppArgb(byte []bs, string path)
{
MemoryStream ms = new MemoryStream(bs);
Image imgr = Image.FromStream(ms);
Bitmap bmp = new Bitmap(imgr.Width, imgr.Height, PixelFormat.Format32bppArgb);
Graphics g = Graphics.FromImage(bmp);
g.DrawImage(imgr, new Point(0,0));
g.Dispose();
bmp.Save(path);
}
转载于:https://www.cnblogs.com/wuyi8128/archive/2011/01/06/1927055.html