public static Bitmap ConvertCMYK(Bitmap bmp)
{
Bitmap tmpBmp = new Bitmap(bmp.Width, bmp.Height, PixelFormat.Format24bppRgb);
Graphics g = Graphics.FromImage(tmpBmp);
g.CompositingQuality = CompositingQuality.HighQuality;
g.SmoothingMode = SmoothingMode.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
//此时GDI+自动将CMYK格式转换为RGB了
g.DrawImage(bmp, rect);
Bitmap returnBmp = new Bitmap(tmpBmp);
g.Dispose();
tmpBmp.Dispose();
bmp.Dispose();
return returnBmp;
}
这个方法 红色区域报错,请那位大侠帮助看下,感激不尽