We have recently upgraded from ImageMagick 6.3.3 to 6.6.9, and our script that uses PerlMagick's Modulate call broke because in 6.3.3 Modulate uses HSB color space but now it uses HSL color space.
Using convert -define modulate:colorspace=HSB -modulate from the command line I can get results that match those from 6.3.3. But I can't figure out how to tell Modulate to use HSB color space in PerlMagick. I have tried Quantize(colorspace => 'HSB'), which doesn't seem to have any effect at all. I have also tried Set(colorspace => 'HSB'), which does change the output, but the output doesn't match that from running convert -define modulate:colorspace=HSB -modulate, which is what we want.
Any advice on how to make Modulate use HSB color space is greatly appreciated. Thanks in advance.
How to set color space to HSB for the Modulate call?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: How to set color space to HSB for the Modulate call?
You need to set an image artifact. that is what -define does.
See IM Examples, Basics, Define Global Artifacts
http://www.imagemagick.org/Usage/basics/#define
But you can also use -set for this! EG: set option:modulate:colorspace HSB
You can see image artefacts that were defined in the -verbose info: output.
I have not looked over the PerlMagick commands, but I am sure 'set' is present.
See IM Examples, Basics, Define Global Artifacts
http://www.imagemagick.org/Usage/basics/#define
But you can also use -set for this! EG: set option:modulate:colorspace HSB
You can see image artefacts that were defined in the -verbose info: output.
I have not looked over the PerlMagick commands, but I am sure 'set' is present.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/