Page 1 of 1

How to convert an image with iso coated to iso newspaper

Posted: 2017-05-30T03:15:14-07:00
by wizzardOfIso
Hi,
I want to use an image with color profile 'iso coated' to be printed in newspaper. In Photoshop I can do the necessary conversion from 'iso coated' to 'iso newspaper'. But I want to do it serverside.
*** Can anyone give me a useful hint? ***
Thanks in advance!!!

Re: How to convert an image with iso coated to iso newspaper

Posted: 2017-05-30T07:34:14-07:00
by snibgo
Here's some hints.

1. Get the profile you want. I expect you already have it in a Photoshop directory. It may be named *newspaper*.icc.

2. I expect the image file has an embedded profile. You can check this with "identify -verbose infile.ext".

3. Then you can convert to the new profile with "convert infile.ext -profile newspaper.icc outfile.ext". Use the full path to the icc file, and the in and out files.

4. If your IM is v7, use "magick" instead of "convert".

Re: How to convert an image with iso coated to iso newspaper

Posted: 2017-05-30T09:38:55-07:00
by wizzardOfIso
Hallo snibgo,

thanks for your reply.
That does the job. I think I do not understand the handling of color profiles good enough. In Photoshop I have two ways to assign the profile. The first one is to assign the needed profile. The second one is to transform the image to the needed profile. (I use the german version of Photoshop, so the menu labels are "Profil zuweisen ..." and "In Profil umwandeln ...")
The resulting images are different. So I expected to find also a "second way" in imagemagick.
I hope the print result of the generated file (of "convert infile.ext -profile newspaper.icc outfile.ext") is good enough.
Thanks for supporting me!

Re: How to convert an image with iso coated to iso newspaper

Posted: 2017-05-30T11:15:04-07:00
by snibgo
The colour of a pixel is stored as numbers. A profile tells readers what those numbers mean (how the colours are encoded), so all devices should display an image in the same way. When there is no embedded profile, most readers assume the profile is sRGB.

Assigning a profile means the metadata is changed, declaring that a certain profile should be used. Pixel numbers not changed.

Converting the profile of an image changes pixel numbers, so that the colour of pixels don't change, but the way they are encoded does change. This also changes the metadata, of course.

IM can assign or convert, or both.

These assign:

Code: Select all

convert in.ext -set profile newprofile.icc out.exe

convert in.ext +profile "*" -profile newprofile.icc out.exe  [This first removes any profiles, then assigns one.]
If in.exe has no embedded profile, this also assigns:

Code: Select all

convert in.ext -profile newprofile.icc out.exe
To convert from embedded profile to a new profile:

Code: Select all

convert in.ext -profile newprofile.icc out.exe
To convert, when the file may or may not have an embedded profile, to a new profile:

Code: Select all

convert in.ext -profile oldprofile.icc -profile newprofile.icc out.exe
Explanation: if there is no profile, oldprofile is assigned. If there is already an embedded profile, the image is first converted to oldprofile, then to newprofile.