How i could use gamma and contrast in imagemagick?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

How i could use gamma and contrast in imagemagick?

Post by diegomage » 2017-09-02T09:55:50-07:00

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

User avatar
fmw42
Posts: 22079
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-09-02T11:22:46-07:00

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/

diegomage
Posts: 168
Joined: 2017-03-08T10:12:28-07:00
Authentication code: 1151

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

Post by diegomage » 2017-09-02T11:44:09-07:00

Very thankyou

User avatar
fmw42
Posts: 22079
Joined: 2007-07-02T17:14:51-07:00
Location: Sunnyvale, California, USA

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

Post by fmw42 » 2017-09-02T12:01:25-07:00

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

Post Reply