C# bitmap对象能转换为不同PixelFormat格式的吗
Bitmap bmOld = new Bitmap(strOldFilePath);
int iwidth = bmOld.Width;
int iHeight = bmOld.Height;
Bitmap bmNew = new Bitmap(iwidth, iHeight, PixelFormat.Format16bppRgb565);
Graphics g = Graphics.FromImage(bmNew);
g.DrawImage(bmOld, new Point(0,0));
g.Dispose();
//bmNew.Save(strNewFilePath, ImageFormat.Bmp);
MessageBox.Show(bmOld.PixelFormat.ToString());
MessageBox.Show(bmNew.PixelFormat.ToString());
网上有这种方法,但如果我把新的bitmap保存后,重新打开,再显示它的PixelFormat,则会变成Format32rgb了.