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
Duplicate Photoshop Level
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Duplicate Photoshop Level
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
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
That works , Thank you so much for all the links as well!