stevesimo Posted May 1, 2007 Share Posted May 1, 2007 Hi, I have a client who wants to upload images to his online shop. Unfortunately a lot of the images are in CMYK format and he would struggle with converting the images using software ie photoshop. My question is does anyone know of a script which will convert CMYK to RGB format? Otherwise the only other option I can think of is for him to give me the images and I will convert them for him which is far from ideal. Any advice gladly received Thanks, Steve (Blackpool) Link to comment https://forums.phpfreaks.com/topic/49558-cmyk-to-rgb-conversion/ Share on other sites More sharing options...
trq Posted May 1, 2007 Share Posted May 1, 2007 Imagemagick should be able to help you out. Though its not at all a standard php extension, there is one available Here. Otherwise, you may be lucky enough to have access to it via the shell. Are you on a Linux server? What does... <?php echo exec("import -version"); ?> produce? Link to comment https://forums.phpfreaks.com/topic/49558-cmyk-to-rgb-conversion/#findComment-242945 Share on other sites More sharing options...
stevesimo Posted May 4, 2007 Author Share Posted May 4, 2007 Hi, I have found a script which might do the conversion $getimagesize = getimagesize($image); if ( isset($getimagesize['channels']) && $getimagesize['channels'] == 4 && $getimagesize[2] == IMAGETYPE_JPEG ) { $im = @imagecreatefromjpeg($image); if ($im) { header ("Content-type: image/jpg"); imagejpeg($im, NULL, 100); imagedestroy($im); } } How do I read my image into the variable $image? Steve Link to comment https://forums.phpfreaks.com/topic/49558-cmyk-to-rgb-conversion/#findComment-245413 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.