Imagemagick on Mac vs. PC

Post Reply
User avatar
Terkelsen
Advanced member
Posts: 344
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Imagemagick on Mac vs. PC

Post by Terkelsen »

I'm trying to convert a grayscale image containing an icc profile (Generic Gray Gamma 2.2 Profile.icc) to AdobeRGB 1998 using Imagemagick via "Execute command" in Switch.

It all works very well on Mac. Doing the exact same thing on Windows doesn't change the colorspace to RGB.

Using the "Inspect Job" feature in Switch before the conversion will show "Image -> Colorspace=1" (which means grayscale) and "Image -> ICCProfile=Gray Gamma 2.2". After running through Imagemagick both informations are blank on Windows while on Mac they are correctly changed to "3" and "AdobeRGB 1998".

If I do the same on Windows using a CMYK image as input it all works fine.

I have even tried to move the ICC-profiles to a root folder so the argument is pretty simple:

"%1" -profile "C:\ICCProfiles\Generic Gray Gamma 22 Profile.icc" -profile "C:\ICCProfiles\AdobeRGB1998.icc" "%2"

As I mentioned it works if I use a CMYK profile as the source profile and the same argument (with different paths obviously) works well on Mac.

Any ideas?
User avatar
JimmyHartington
Advanced member
Posts: 487
Joined: Tue Mar 22, 2011 7:38 am

Re: Imagemagick on Mac vs. PC

Post by JimmyHartington »

Same version of ImageMagick?
User avatar
Terkelsen
Advanced member
Posts: 344
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Imagemagick on Mac vs. PC

Post by Terkelsen »

Almost ;-) 7.1.1 on Mac and 7.1.2 on Windows.
User avatar
JimmyHartington
Advanced member
Posts: 487
Joined: Tue Mar 22, 2011 7:38 am

Re: Imagemagick on Mac vs. PC

Post by JimmyHartington »

Ahh. Does not sound like that should be the problem with the small changes in versions.
User avatar
JimmyHartington
Advanced member
Posts: 487
Joined: Tue Mar 22, 2011 7:38 am

Re: Imagemagick on Mac vs. PC

Post by JimmyHartington »

Just tried on my Windows and it does also not convert it to RGB.
But when I try to open the output in Photoshop I got an error with invalid profile.
So it seems it attaches the Adobe RGB profile without converting the image.

Here is output another cli tool of the output file:

Code: Select all

General
Complete name                            : /Users/jh/Desktop/test-gray-1.jpg
Format                                   : JPEG
File size                                : 52.1 KiB
Encoded date                             : 2025-10-09 15:24:56+02:00
Writing application                      : Adobe Photoshop 26.11
Writing operating system                 : Apple macOS

Image #1
Format                                   : JPEG
Width                                    : 1 691 pixels
Height                                   : 663 pixels
Color space                              : Y
Bit depth                                : 8 bits
Compression mode                         : Lossy
Stream size                              : 43.6 KiB (84%)
ColorSpace_ICC                           : RGB
colour_primaries_ICC_Description         : Adobe RGB (1998)

Image #2
Type                                     : Thumbnail
Format                                   : JPEG
Muxing mode                              : Exif
Width                                    : 160 pixels
Height                                   : 63 pixels
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Compression mode                         : Lossy
Stream size                              : 991 Bytes (2%)

Image #3
Type                                     : Thumbnail
Format                                   : JPEG
Muxing mode                              : PSD
Width                                    : 160 pixels
Height                                   : 63 pixels
Color space                              : YUV
Chroma subsampling                       : 4:2:0
Bit depth                                : 8 bits
Compression mode                         : Lossy
Stream size                              : 992 Bytes (2%)
I then tried to ask AI.
And it suggested to add "-type TrueColor" to the command.

And then it works on my Windows, so maybe it also does on yours?

Code: Select all

"%1" -type TrueColor -profile "C:\ICCProfiles\Generic Gray Gamma 22 Profile.icc" -profile "C:\ICCProfiles\AdobeRGB1998.icc" "%2"
freddyp
Advanced member
Posts: 1151
Joined: Thu Feb 09, 2012 3:53 pm

Re: Imagemagick on Mac vs. PC

Post by freddyp »

It may not apply to your use case, because you may require an image type output, but know that you can also convert images to PDF using PitStop Server. There you have an easier control over what happens with color management when you do a color conversion. When using the app in Switch you just need to consider that there is a property "Enable image input" which defaults to "No", and that you therefore have to set to "Yes".
User avatar
Terkelsen
Advanced member
Posts: 344
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Imagemagick on Mac vs. PC

Post by Terkelsen »

I'm not quite sure I understand why but yes, the "-type TrueColor" argument seems to solve the problem :shock: But why isn't it needed on Mac then. Well, never mind. It works :D
User avatar
Terkelsen
Advanced member
Posts: 344
Joined: Thu Sep 08, 2011 5:08 pm
Contact:

Re: Imagemagick on Mac vs. PC

Post by Terkelsen »

@freddyp, I'm aware of that but in this case I need an image output and PitStop Server is not available.
Post Reply