Page 1 of 1

[Resolved]possible bug -negate IM 6.7.9.1 Q16

Posted: 2012-08-24T13:10:53-07:00
by fmw42
IM 6.7.9.1 Q16 Mac OSX Snow Leopard

Input:
Image

In this command the first image (channel G = saturation) never gets negated.

convert zelda3_lowsat.jpg -colorspace HSL -channel G -negate +channel \
-channel B -solarize 50% -level 0x50% +channel -channel GB -separate +channel \
zelda3_lowsat_sb_solar1_%d.jpg



In this command the first image (channel G = saturation) properly gets negated.

convert zelda3_lowsat.jpg -colorspace HSL -channel GB -separate +channel \
\( -clone 0 -negate \) \
\( -clone 1 -solarize 50% -level 0x50% \) \
-delete 0,1 zelda3_lowsat_sb_solar2_%d.jpg


Is this a bug or am I misunderstanding or missing some thing?

Re: possible bug -negate IM 6.7.9.1 Q16

Posted: 2012-08-24T17:06:17-07:00
by magick
The negate for the green channel is working:

convert zelda3_lowsat.jpg -colorspace HSL -channel G -negate -verbose info:

Code: Select all

    Red:
      min: 0 (0)
      max: 255 (0.999878)
      mean: 74.911 (0.293768)
      standard deviation: 98.3857 (0.385826)
      kurtosis: -0.569333
      skewness: 1.13011
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 149.094 (0.584682)
      standard deviation: 80.9888 (0.317603)
      kurtosis: -0.968081
      skewness: -0.641811
    Blue:
      min: 0 (0.000457771)
      max: 247 (0.969345)
      mean: 92.5542 (0.362958)
      standard deviation: 55.062 (0.215929)
      kurtosis: -0.451429
      skewness: 0.582601
convert zelda3_lowsat.jpg -colorspace HSL -verbose info:

Code: Select all

    Red:
      min: 0 (0)
      max: 255 (0.999878)
      mean: 74.911 (0.293768)
      standard deviation: 98.3857 (0.385826)
      kurtosis: -0.569333
      skewness: 1.13011
    Green:
      min: 0 (0)
      max: 255 (1)
      mean: 105.906 (0.415318)
      standard deviation: 80.9888 (0.317603)
      kurtosis: -0.968081
      skewness: 0.641811
    Blue:
      min: 0 (0.000457771)
      max: 247 (0.969345)
      mean: 92.5542 (0.362958)
      standard deviation: 55.062 (0.215929)
      kurtosis: -0.451429
      skewness: 0.582601

Re: possible bug -negate IM 6.7.9.1 Q16

Posted: 2012-08-24T17:17:35-07:00
by fmw42
But it does not work when followed by the solarize on the blue channel. Run my commands and look at the output images. The first image (green=saturation) has not been inverted in the first command but is inverted in the second command.

Sorry I should have mentioned that it works fine without the solarize on the blue channel (at least for me on my Mac OSX Snow Leopard IM 6.7.9.1 Q16)

Re: possible bug -negate IM 6.7.9.1 Q16

Posted: 2012-08-24T18:00:59-07:00
by magick
The -solarize option is not sensitive to the -channel option. We'll add support in the next point release.

Re: possible bug -negate IM 6.7.9.1 Q16

Posted: 2012-08-25T13:58:34-07:00
by fmw42
With the latest beta from today, it appears to be now properly negating the saturation, but not properly solarizing the brightness.


Input:
Image



Bad:

convert zelda3_lowsat.jpg -colorspace HSL -channel G -negate +channel \
-channel B -solarize 50% -level 0x50% +channel -channel GB -separate +channel \
zelda3_lowsat_sb_solar1_%d.jpg

Negated saturation correct
Image

Solarized brightness incorrect
Image



Correct:

convert zelda3_lowsat.jpg -colorspace HSL -channel GB -separate +channel \
\( -clone 0 -negate \) \
\( -clone 1 -solarize 50% -level 0x50% \) \
-delete 0,1 zelda3_lowsat_sb_solar2_%d.jpg

Negated saturation correct
Image

Solarized brightness correct
Image

Re: possible bug -negate IM 6.7.9.1 Q16

Posted: 2012-08-25T15:29:40-07:00
by magick
Will have a patch in about an hours. Thanks.

Re: possible bug -negate IM 6.7.9.1 Q16

Posted: 2012-08-25T22:42:37-07:00
by fmw42
magick wrote:Will have a patch in about an hours. Thanks.

Thanks. Seems to be working fine now in IM 6.7.9.2 Q16 just released.