convert -sepia-tone different on win vs. linux
convert -sepia-tone different on win vs. linux
Hi,
I have an issue with the 2 images below: the first one is created on Linux , the second one on Windows using the same command , same versions of ImageMagick (6.6.5-0) Tried newer versions of IM and they all seem to provide different results Windows vs. Linux.
convert c.jpg -sepia-tone 80% 1.jpg (on Linux)
convert c.jpg -sepia-tone 80% 2.jpg (on Windows)
the results are very different and i cannot figure out why.
What am i doing wrong?
Thanks
I have an issue with the 2 images below: the first one is created on Linux , the second one on Windows using the same command , same versions of ImageMagick (6.6.5-0) Tried newer versions of IM and they all seem to provide different results Windows vs. Linux.
convert c.jpg -sepia-tone 80% 1.jpg (on Linux)
convert c.jpg -sepia-tone 80% 2.jpg (on Windows)
the results are very different and i cannot figure out why.
What am i doing wrong?
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert -sepia-tone different on win vs. linux
I am not sure about your current IM version, but for versions after 6.7.8.3 all grayscale images are treated as linear rather than sRGB. This means that they will look darker than normal. So you may need to convert from RGB to sRGB before processing your grayscale image.
see
viewtopic.php?f=4&t=21269
see
viewtopic.php?f=4&t=21269
Re: convert -sepia-tone different on win vs. linux
what about
convert c.jpg -set colorspace sRGB -sepia-tone 80% 1.jpg
convert c.jpg -set colorspace sRGB -sepia-tone 80% 2.jpg
convert c.jpg -set colorspace sRGB -sepia-tone 80% 1.jpg
convert c.jpg -set colorspace sRGB -sepia-tone 80% 2.jpg
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert -sepia-tone different on win vs. linux
Perhaps it is best if you post a link to your original image so others can test with it. I presume it is a grayscale image.
Re: convert -sepia-tone different on win vs. linux
The original image is not greyscale. See here
Doing convert c.jpg -set colorspace sRGB -sepia-tone 80% 3.jpg gives yet another bad result.
Doing convert c.jpg -set colorspace sRGB -sepia-tone 80% 3.jpg gives yet another bad result.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert -sepia-tone different on win vs. linux
My guess is that -sepia-tone is expecting or converting a color image into grayscale before applying the sepia-tone. From IM 6.7.5.5 (or 6.7.6.7) colorspace RGB and sRGB were swapped (to make them correct). Furthermore after IM 6.7.8.3 grayscale images were considered linear. Thus in IM 6.8.0.0, this works for me. Your input is true sRGB, but the conversion by sepiatone makes it linear grayscale. Thus one needs to tell it to think the image is linear even though sRGB, (that is make it think it is RGB). So this works to reproduce your Linux results on my Mac OSX Snow Leopard, IM 6.8.0.0 Q16
convert c.jpg -set colorspace RGB -sepia-tone 80% c2.jpg
I suspect you have mixed versions of IM and are getting different results due to the changes that took place over some time in IM. I would suggest you upgrade to something after IM 6.7.8.3.
The darker of your two result could be that IM is converting it to linear and that would make it darker. You could try on your Windows, the suggestion by henrywho
convert c.jpg -set colorspace sRGB -sepia-tone 80% c2.jpg
since the earlier versions were treating RGB as sRGB and sRGB as RGB, so the above would try to make the grayscale version be treated (not converted) as a proper linear RGB
convert c.jpg -set colorspace RGB -sepia-tone 80% c2.jpg
I suspect you have mixed versions of IM and are getting different results due to the changes that took place over some time in IM. I would suggest you upgrade to something after IM 6.7.8.3.
The darker of your two result could be that IM is converting it to linear and that would make it darker. You could try on your Windows, the suggestion by henrywho
convert c.jpg -set colorspace sRGB -sepia-tone 80% c2.jpg
since the earlier versions were treating RGB as sRGB and sRGB as RGB, so the above would try to make the grayscale version be treated (not converted) as a proper linear RGB
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: convert -sepia-tone different on win vs. linux
First check versions of Imagemagick on the two machines... (most likely cause).
Second check versions of the JPEG library!
Second check versions of the JPEG library!
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: convert -sepia-tone different on win vs. linux
Hey guys,
Thanks so much for your input. It turns out i had to do
So basically forcing Windows to convert it to RGB.
The sRGB conversation was close but it actually had to be RGB.
Thanks so much for your input. It turns out i had to do
Code: Select all
convert c.jpg -set colorspace RGB -sepia-tone 80% 1.jpg
The sRGB conversation was close but it actually had to be RGB.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert -sepia-tone different on win vs. linux
creion wrote:Hey guys,
Thanks so much for your input. It turns out i had to doSo basically forcing Windows to convert it to RGB.Code: Select all
convert c.jpg -set colorspace RGB -sepia-tone 80% 1.jpg
The sRGB conversation was close but it actually had to be RGB.
That would be correct if you IM version was greater than 6.7.6.7 (or more likely 6.7.8.3). But you claim it is 6.6.5.0. So that is strange to me. Are you sure of your IM versions and that you don't have multiple versions.
Re: convert -sepia-tone different on win vs. linux
I checked a few times. And on Windows i actually copied convert.exe from the standalone win version of IM to a new folder and did -version first and then ran the command in command prompt and it worked. Version is indeed 6.6.5.0.
fmw42 wrote:creion wrote:Hey guys,
Thanks so much for your input. It turns out i had to doSo basically forcing Windows to convert it to RGB.Code: Select all
convert c.jpg -set colorspace RGB -sepia-tone 80% 1.jpg
The sRGB conversation was close but it actually had to be RGB.
That would be correct if you IM version was greater than 6.7.6.7 (or more likely 6.7.8.3). But you claim it is 6.6.5.0. So that is strange to me. Are you sure of your IM versions and that you don't have multiple versions.