setColourSpace

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
Daniel-DCD

setColourSpace

Post by Daniel-DCD »

Hey Guys,

Just started to use IMagick for a project at work: I'm creating a global image library for everybody in the company to view, find a suitable image they want to be used in a design of some sort, and then to be able to pass a reference number to the Design team.

Now the design team uses PNG, JPEG, GIF, TIFF, PSD, EPS and AI files (among others), Now i need to use IMagick to create previews of those files, and correct any colour modes, etc.

Some files i've come across have the Greyscale or CYMK colour modes applied to them; The grayscale images appear with a light blue hue.
I've tried finding the current image colour space using identifyImage, and it returns 1 (RGB?), Which it's Not....

I've also tried setting the colour space, but that's not working either.
I've tried setting it to RGB using 1 as an integer, and also using the IMagick constant.

Code: Select all

$im->setImageColorSpace(imagick::COLORSPACE_RGB)
Any Advice?
Many thanks

Daniel
Post Reply