Page 1 of 1

contrast to exactly match Photoshop

Posted: 2012-10-17T15:46:45-07:00
by MikeOwen
Hello,
I would like to know how I can precisely match a 20% contrast increase in Photoshop but by using IM.
I assume I should use the -contrast command flag, but I'm unsure of the best way to approach matching Photoshop values.
DOes by chance, IM values exactly match those of Photoshop?
Thanks for any advice.
Mike

Re: contrast to exactly match Photoshop

Posted: 2012-10-17T16:19:41-07:00
by fmw42
MikeOwen wrote:Hello,
I would like to know how I can precisely match a 20% contrast increase in Photoshop but by using IM.
I assume I should use the -contrast command flag, but I'm unsure of the best way to approach matching Photoshop values.
DOes by chance, IM values exactly match those of Photoshop?
Thanks for any advice.
Mike

What version of Photoshop are you using? Photoshop changed the way they do brightness contrast. If you check "legacy" in the window, then it is the old version. If it is unchecked then it is the new version.

In either case there is no one-to-one setting between IM and photoshop. You will have to use trial and error. In relatively current versions of IM, the -brightness-contrast function is similar but not necessary exactly the same as photoshop legacy mode. My unix bash script, sigmoidal, at the link below is similar to but not exactly the same as Photoshop's newer brightness contrast mode. It is based upon IM -sigmoidal-contrast. For contrast, use the minus form with 50% as the second argument to increase contrast. Use the plus form with 50% as the second argument to decrease contrast. However the first argument is not the same as PS contrast value in range 0 to 100%. You will have to compare results to calibrate the IM -sigmoidal contrast. I have tried to get close in my script to the values used in PS, but I cannot guarantee the exact same results as the sigmoidal curves used in each are slightly different.


See
http://www.imagemagick.org/script/comma ... s-contrast
http://www.imagemagick.org/script/comma ... l-contrast
http://www.imagemagick.org/Usage/color_mods/#sigmoidal
http://www.fmwconcepts.com/imagemagick/ ... /index.php
http://www.fmwconcepts.com/imagemagick/ ... /index.php


P.S. IM -level or -gamma can also be used to change contrast and/or brightness.

see
http://www.imagemagick.org/script/comma ... .php#level
http://www.imagemagick.org/Usage/color_mods/#level
http://www.imagemagick.org/Usage/color_ ... evel_gamma