views:

465

answers:

1

In Photoshop you can adjust the hue, saturation and lightness of an image with three sliders. ImageMagick you can modulate the brightness, saturation, and hue.

Minimizing the saturation correctly produces a black and white image in both programs.

Maxing out the saturation appears close, but ImageMagick appears to soften some of the blown out edges while Photoshop will expose more the the compression artifacts.

How can I accurately reproduce Photoshop's saturation changes from within ImageMagick, or other command line tool.

A: 

Could it be that they each use slightly different RGB colour models? From the names of the attributes they use (lightness and brightness), it certainly seems that;

  • Photoshop = HSL (hue, saturation, luminence)
  • ImageMagik = HSV (hue, saturation, value)

Check out this Wikiepedia article on HSL and HSV colour spaces.

MatW
I was aware they used different colorspaces, mainly I have already compensated in changes between lightness vs value. I had assumed that the saturation calculation would have been the same, but it doesn't appear to be according to the example on the Wikipedia page. http://en.wikipedia.org/wiki/HSL_color_space#Conversion_from_HSV_to_RGBHave you addressed the differences in ImageMagick before? How would I go about compensating for difference?
Ambirex
actually I was just re-reading the ImageMagick manual and it says about modulate:"it modifies an image in the special HSL (hue-saturation-luminence) colorspace. "
Ambirex