Page 1 of 1

How i could use gamma and contrast in imagemagick?

Posted: 2017-09-02T09:55:50-07:00
by diegomage
I use gamma -50 , brightness -5 and contrast 40 in kolourpaint but I need to know how use this in imagemagick


Image


this is my original image

Image



Please help me

Re: How i could use gamma and contrast in imagemagick?

Posted: 2017-09-02T11:22:46-07:00
by fmw42
Please always provide your IM version and platform when asking questions since syntax may vary.

ImageMagick has -gamma and -brightness-contrast functions. But there is not guarantee that the same values from your tool will produce the same results in ImageMagick, since argument ranges differ from tool to tool. For example in ImageMagick -gamma 1 is no change. So you will have to experiment with values until you get similar results.

Try starting with:

Code: Select all

convert gpWhd.png -brightness-contrast -5,40 -gamma 0.1 result.png
and adjust the values as desired.


See
http://www.imagemagick.org/script/comma ... s-contrast
http://www.imagemagick.org/script/comma ... .php#gamma
http://www.imagemagick.org/Usage/color_mods/

For ImageMagick novices, see

viewtopic.php?f=1&t=9620
http://http://www.imagemagick.org/scrip ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/

Re: How i could use gamma and contrast in imagemagick?

Posted: 2017-09-02T11:44:09-07:00
by diegomage
Very thankyou

Re: How i could use gamma and contrast in imagemagick?

Posted: 2017-09-02T12:01:25-07:00
by fmw42
try these, they are a bit closer:

Code: Select all

convert gpWhd.png -brightness-contrast -5,40 -gamma 0.05 result1.png

convert gpWhd.png -gamma 0.35 -brightness-contrast -5,40 result2.png