Convert CMYK to RGB:
<?php
$cs = $im->getimagecolorspace();
if ($cs == Gmagick::COLORSPACE_CMYK)
{
$im->setImageColorspace(Gmagick::COLORSPACE_SRGB);
}
?>
(PECL gmagick >= Unknown)
Gmagick::setimagecolorspace — Sets the image colorspace
Sets the image colorspace.
colorspace
The image colorspace: UndefinedColorspace, RGBColorspace, GRAYColorspace, TransparentColorspace, OHTAColorspace, XYZColorspace, YCbCrColorspace, YCCColorspace, YIQColorspace, YPbPrColorspace, YPbPrColorspace, YUVColorspace, CMYKColorspace, sRGBColorspace, HSLColorspace, or HWBColorspace.
The Gmagick object on success
Throws an GmagickException on error.
Convert CMYK to RGB:
<?php
$cs = $im->getimagecolorspace();
if ($cs == Gmagick::COLORSPACE_CMYK)
{
$im->setImageColorspace(Gmagick::COLORSPACE_SRGB);
}
?>