Archived from the Transloadit support forum. Originally posted on February 21, 2011; details may be outdated, see our docs for current behavior. Original thread
We’d like to have the colorspace (RGB/CMYK etc) in our metadata to check the original uploaded colorspace. We can extract the colorspace from the exif, if that’s available, but I don’t like to rely on exif. Some images perhaps don’t have exif and you can manipulate the exif.
With php we were able to extract the colorspace with ImageMagick (http://nl3.php.net/manual/en/function.imagick-getcolorspace.php) but it’d be nice when this info is available in the metadata of the returned json.
Why do you need the colorspace? Is there something we can do on our end, so you wouldn’t have to worry about it at all?
Basically we could get this info for you, but it would require running image magick over every image file we receive and process, so it’d be a significant overall overhead we would like to avoid. (I’m not saying it can’t be done, but it’s just gonna be a little tricky).
--fg
I understand it is not beneficial in terms of speed to look at the color space. To give an overview, this is my use case:
A user uploads a picture to have it printed by our system. We require all pictures to be in rgb. When a picture is not in rgb (but cmyk for example) it means we need to convert it. There are only two problems:
- during conversion colors might change a bit, the user needs to check the colors
- some people demand no adjustments are taken to their picture, so we need to warn them so they can upload a new version where they converted the picture into rgb themselves
In order to know whether the original file has been converted, we need to know the color space. Is it possible to put a flag in the template to get the color space (and accept the overhead of image magick)? Or do you have other suggestions?
(PS. compliments for the communication: quick answers and always thinking with the user!)
Sure, this can definitely be done. If you decide to contract us for the rotation feature, we’ll add this as a complementary bonus : ).
--fg