Page 1 of 1

Problem with hue shift using "-modulate" with IM7.0.7-39

Posted: 2018-06-11T12:01:56-07:00
by GeeMack
Using IM 7.0.7-39 Q16 x64 HDRI from a Windows 10 command line, this command generates the image below.

Code: Select all

magick -size 4x200 xc:red -duplicate 199 -modulate 100,100,%[fx:t] +append modhue.png
Image

Those 200 images appended should show a continuous shifting of the hue from cyan on the left, through red in the center, and back through green to cyan on the right, but the result isn't as expected. Setting the hue shift to more than "133.3" on the "-modulate" operator seems to cycle the setting back to "100". And it changes again the same way when the setting is more than "166.6".

This issue goes back at least one version before 7.0.7-39.

The same problem is also present in IM 6.9.9-50. Starting with a red image and a "-modulate" hue setting of "133", this command changes the color to "srgb(100%,99%,0%)", almost pure yellow as expected...

Code: Select all

convert xc:red -modulate 100,100,133 -format %[pixel:p{0,0}] info:
But change that "-modulate" hue setting to "134"...

Code: Select all

convert xc:red -modulate 100,100,134 -format %[pixel:p{0,0}] info:
... and the result is "srgb(100%,2%,0%)", almost the same as the input color of pure red. It should be shifting toward green.

Re: Problem with hue shift using "-modulate" with IM7.0.7-39

Posted: 2018-06-11T12:16:13-07:00
by fmw42
I can confirm this. The change to a bad result occurred first at 6.9.9.41 Q16 Mac OSX.

Re: Problem with hue shift using "-modulate" with IM7.0.7-39

Posted: 2018-06-12T03:22:23-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

Re: Problem with hue shift using "-modulate" with IM7.0.7-39

Posted: 2018-06-13T14:37:34-07:00
by GeeMack
This issue appears to be fixed in the new IM version 7.0.8-0. Thanks!