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
The Gmagick object.
Throws an GmagickException on error.