Page 1 of 1
Duplicate Photoshop Level
Posted: 2014-08-01T11:50:43-07:00
by JagVoylla
All,
I am new to Imagemagick and want to duplicate photoshop like levels (10, 245, 0.95) on my Image. I am seeing a complete washout of the image, what am I missing?
convert IMTEST.jpg -level 10,245,0.95 IM.jpg
Re: Duplicate Photoshop Level
Posted: 2014-08-01T11:59:08-07:00
by fmw42
IM -level values for min and max, depend upon the Q level of your IM compile. check convert -version. I assume it will say Q16, which means that IM is expecting values in the range of 0 to 65535. So you need to convert your values of 0 to 255 to the range of 65535 or what I usually do is convert the values to percent and use that
10/255 = 0.03921568627451 (x100 to get percent)
245/255 = 0.96078431372549 (x100 to get percent)
so try
-level 3.921%,96.08%,0.95
The gamma value (0.95) does not need any conversion.
see
http://www.imagemagick.org/script/comma ... .php#level
For new users of IM, see
http://www.imagemagick.org/script/comma ... ptions.php
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/
To duplicate PS levels output values, follow the above command with +level outputmin,outputmax
Code: Select all
-level inputmin,inputmax,gamma +level outputmin,outputmax
Re: Duplicate Photoshop Level
Posted: 2014-08-01T12:08:00-07:00
by JagVoylla
That works , Thank you so much for all the links as well!