怎么判断jpg图片是RGB模式还是CMYK模式

如何判断jpg图片是RGB模式还是CMYK模式?如何判断jpg图片是RGB模式还是CMYK模式?[解决办法]public static b

如何判断jpg图片是RGB模式还是CMYK模式?
如何判断jpg图片是RGB模式还是CMYK模式?

[解决办法]
public static bool IsCMYK(System.Drawing.Image img)
{
bool isCmyk;

if ((GetImageFlags(img).IndexOf( "Ycck ") > -1) || (GetImageFlags(img).IndexOf( "Cmyk ") > -1))
{ isCmyk = true; }
else
{ isCmyk = false; }

return isCmyk;
}


参见
http://blog.csdn.net/johnsuna/archive/2007/09/11/1781309.aspx