我有一张图片被eBay API拒绝,因为出现了以下问题:
<ShortMessage>Source picture uses an unsupported colorspace.</ShortMessage>
<LongMessage>Pictures with a CMYK colorspace are not supported; source pictures must use a RGB colorspace compatible with all web browsers supported by eBay. Submit pictures created using a camera or scanner set to save images with RGB color.</LongMessage>
我并不知道它是CMYK格式,也不确定如何判断。然后我使用了以下代码来尝试转换:
$image= "$img.jpg";
$i = new Imagick($image);
$i->setImageColorspace(Imagick::COLORSPACE_SRGB);
$i->writeImage($image);
$i->destroy();
它可以转换(并且现在已被eBay接受),但它也会颠倒图片的颜色。为什么会这样做,是否有另外一个
COLORSPACE
我应该使用呢?谢谢。