Page 1 of 1
Bad Colors with colorspace and gamma options
Posted: 2019-04-07T09:15:35-07:00
by jake9wi
On windows seven x64 using version 7.0.8-3 the image returns with good colors but with version 7.0.8-38 colors are distorted.
link to images:
https://www.dropbox.com/sh/lzbule9mcn78 ... vyIKa?dl=0
Code: Select all
magick.exe original_fdc_o_ea.png ^
-colorspace CIELAB -intent Relative ^
-colorspace sRGB -intent Relative ^
-gamma 0.8 -type Truecolor test_708-38_fdc_o_ea.PNG"
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-07T13:56:17-07:00
by dlemstra
Can you reproduce this issue with ImageMagick 7.0.8-39 that has just been released?
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-07T14:12:45-07:00
by fmw42
It does not reproduce the original colors for me in 7.0.8.39 Q16 Mac OSX. But does with IM 6.9.10.39 Q16.
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-07T15:23:39-07:00
by jake9wi
Yes, 7.0.8-39 still produces the error.
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-08T04:11:17-07:00
by magick
What do you get for these commands:
Code: Select all
$ compare -metric rmse test_708-38_fdc_o_ea.PNG original_fdc_o_ea.png null:
1567.21 (0.023914)
$ compare -metric rmse test_708-03_fdc_o_ea.PNG original_fdc_o_ea.png x:
1567.21 (0.023914)
$ compare -metric rmse test_708-38_fdc_o_ea.PNG test_708-03_fdc_o_ea.PNG null:
0.606276 (9.25117e-06)
Which suggests ImageMagick 7.0.8-39 is producing nearly the same exact results as 7.0.8-3. If you get different results, the problem may be a Windows/Mac issue.
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-08T07:31:34-07:00
by jake9wi
Code: Select all
A:\z_zip\imagemagick\708-39>compare.exe -metric rmse test_708-38_fdc_o_ea.PNG original_fdc_o_ea.png null:
13129.2 (0.200338)
A:\z_zip\imagemagick\708-39>compare.exe -metric rmse test_708-03_fdc_o_ea.PNG original_fdc_o_ea.png null:
1567.21 (0.023914)
A:\z_zip\imagemagick\708-39>compare.exe -metric rmse test_708-38_fdc_o_ea.PNG test_708-03_fdc_o_ea.PNG null:
13035.3 (0.198906)
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-08T08:23:56-07:00
by snibgo
jake9wi wrote:magick.exe original_fdc_o_ea.png ^
-colorspace CIELAB -intent Relative ^
-colorspace sRGB -intent Relative ^
-gamma 0.8 -type Truecolor test_708-38_fdc_o_ea.PNG"
I suggest you simplify the command. What is the simplest that shows the problem?
You are not using "-profile", so "-intent" should do nothing.
If the input is sRGB, then "-colorspace CIELAB -colorspace sRGB" should do nothing.
"-type Truecolor" should not make a significant difference.
"-gamma 0.8" will make a difference, but should be the same in each version. Try with "-gamma 1.0", which should not change the image.
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-08T08:42:00-07:00
by jake9wi
The unsimplified command i am using is this:
Code: Select all
magick.exe ..\fdc_o_ea.png ^
-colorspace CIELAB -intent Relative ^
-filter hermite -distort resize "1000x744!" ^
-colorspace sRGB -intent Relative ^
-gamma 0.8 -quality 00 -type TrueColor fdc_o_ea.PNG
Dropping 'truecolor' and 'intent Relative ' still produces the error:
Code: Select all
magick.exe original_fdc_o_ea.png ^
-colorspace CIELAB ^
-colorspace sRGB ^
-gamma 0.8 test_708-38_fdc_o_ea.PNG"
If I set gamma to one or drop '-colorspace CIELAB' the error is not produced.
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-08T09:11:07-07:00
by snibgo
jake9wi wrote:...or drop '-colorspace CIELAB' the error is not produced.
Good. That suggests that "-colorspace CIELAB" is changing the gamma setting, but "-colorspace sRGB" isn't changing it back. This should help the developers find the bug.
Meanwhile, as a workaround, I suggest you don't use "-gamma 0.8". Instead, use "-evaluate Pow 1.25". Does that work correctly in both versions?
(Note that 1/0.8 = 1.25.)
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-08T10:06:01-07:00
by jake9wi
Using '-evaluate Pow 1.25' still produces the error in ver38 & 39, '-evaluate Pow 1.00' does not produce the error.
In ver3 '-evaluate Pow 1.25' works good like gamma 0.8.
Re: Bad Colors with colorspace and gamma options
Posted: 2019-04-08T10:17:01-07:00
by snibgo
Okay. This is weird, probably a bug in 7.0.8-38 and -39, possibly restricted to Windows and Mac versions. I'll leave it to the developers.