Hi,
I would like to know how I can use IM to convert any image to a sRGB image. I have a sRGB.icc colour profile file, and I want all the input images converted to this profile. The input images could have any colour profile of maybe they don't even have a profile at all.
Can someone help me with this? Thanks!
Howto convert random image (no knowledge on profile) to sRGB
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Howto convert random image (no knowledge on profile) to
for best results you need to know the input image color profile. see http://www.imagemagick.org/Usage/formats/#profiles
Re: Howto convert random image (no knowledge on profile) to
So I should build in a check to get the input profile, and use this input profile to convert the image to sRGB.
But what if there is no embedded profile in the image, and how would the commandstring look like to do all this?
But what if there is no embedded profile in the image, and how would the commandstring look like to do all this?
Re: Howto convert random image (no knowledge on profile) to
If the image contains the 'source' profile (i.e. fully embedded in it, not just the name) then you need only specify the 'destination' profile: if you specify only one -profile flag then convert will automatically use the embedded profile (if it is there).JimKerr wrote:So I should build in a check to get the input profile, and use this input profile to convert the image to sRGB.
The problem is that if the image doesn't contain a profile then you need to specify both the 'source' and 'destination' profiles.
We had a similar issue and ended up using USWebCoatedSWOP.icc as the source (CMYK) profile if the image didn't contain one. This gives much better results than using the -colorspace option, although I guess that depends on your images, i.e. which color profiles were used to create them.
See viewtopic.php?f=1&t=9149 for more about this.
Regards,
Martin