public Bitmap ConvertFormat32To24(Bitmap source)
{
// 创建一个新的Bitmap,PixelFormat设置为Format24bppRgba
Bitmap convertedBitmap = new Bitmap(source.Width, source.Height, PixelFormat.Format24bppRgb);
// 使用Graphics对象来进行转换
using (Graphics graphics = Graphics.FromImage(convertedBitmap))
{
// 使用DrawImage方法进行格式转换
graphics.DrawImage(source, new Rectangle(0, 0, source.Width, source.Height));
}
return convertedBitmap;
}
01-01
01-20
12-31
01-20
01-20
07-19
647
02-15
1058
07-28
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交