Bulk convert images with PHP GD2

I have a directory on my server filled with .jpg images, the problem is some of these images are in CMYK and don't display in Internet Explorer as it only shows RGB images. I'd like to convert all these images to RGB format. I currently have PHP with GD and was wondering if there was a way to bulk convert all these images in this directory and it's sub directories from the command line?
TotallyMeAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Sander StadConnect With a Mentor Systeemontwikkelaar, Database AdministratorCommented:
0
 
Chris HarteConnect With a Mentor ThaumaturgeCommented:
cmyk images are not natively supported by php. To convert them you are going to have use the imagemagick PECL extention.
These are undocumented on the php site, which does not help, but here is a function that might.
http://uk2.php.net/manual/en/function.imagick-setimagecolorspace.php

There is also a user group where they discuss the same problem.
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10743&start=0&st=0&sk=t&sd=a
0
All Courses

From novice to tech pro — start learning today.