-profile error

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
holden
Posts: 79
Joined: 2013-02-07T08:22:57-07:00
Authentication code: 6789

-profile error

Post by holden »

I keep getting an error when trying to convert a cmyk file to a srgb one- "unable to open file 'sRGB.icc' : no such file or directory." I've been trying the simplest possible form from the IM website:

Code: Select all

convert cmyk_image.jpg -profile sRGB.icc rgb_image.jpg
and still get the error.

*on Windows if that makes a difference*
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -profile error

Post by fmw42 »

provide the full path to the profiles if they are not in your working directory.

If the input image has a cmyk profile, then you need to provide the input CMYK or whatever is used profile and the output sRGB profile

Look in the verbose information for the file to see what is being used
holden
Posts: 79
Joined: 2013-02-07T08:22:57-07:00
Authentication code: 6789

Re: -profile error

Post by holden »

Thanks for the tip concerning the paths and verbose, it clears things up.
holden
Posts: 79
Joined: 2013-02-07T08:22:57-07:00
Authentication code: 6789

Re: -profile error

Post by holden »

I'm still struggling with this, but in a different place, maybe I'm just doing things in the wrong order. An example:

Code: Select all

convert -size 3000x2400 xc:white ( uvgrid.jpg -strip -resize 2800x2400 ) -gravity center -composite -profile mycustomprofile.icc 8x10colortest.jpg
I've tried putting the -strip and -profile mycustomprofile.icc part right after uvgrid.jpg, and before 8x10colortest.jpg, as well as this combination. Every time I print the output it's the same, and not matching my control print from the same printer. Any ideas?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -profile error

Post by snibgo »

Diagnosis is difficult without seeing the image and control print.

Why are you stripping the image? If it contains profile data (which is how to translate the pixel numbers into colours, roughly speaking) then you are throwing away that information.
snibgo's IM pages: im.snibgo.com
holden
Posts: 79
Joined: 2013-02-07T08:22:57-07:00
Authentication code: 6789

Re: -profile error

Post by holden »

I'm stripping it because we get images with different profiles, so I thought a generic function would be more efficient than doing the -verbose route. I'm still pretty new at this so I'm sure there is a smarter way!

edit: i did it without the strip and it looks like that did the trick- thanks :D
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -profile error

Post by snibgo »

Yeah, discarding information may be more efficient than using it, but perhaps less effective.

What happens when you don't strip? Can you put the image somewhere, and post the URL here?
snibgo's IM pages: im.snibgo.com
Post Reply