(brightness and contrast on image) query win-command line

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
Ravinderjit S.Sidhu

(brightness and contrast on image) query win-command line

Post by Ravinderjit S.Sidhu »

I have gone through examples of Imagemagick.

http://www.imagemagick.org/Usage/color/

I need a simple "Convert command line example" to set brightness and contrast of an image (BMP or PNG).

Please guide me.

Regards
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: (brightness and contrast on image) query win-command line

Post by anthony »

Until such time as I am able to fix up the color handling options of IM you are stuck with what is provided. The new options will be basied on color handle scripts created by Fred Weinhaus http://www.fmwconcepts.com/fmw/fmw.html
You may like to check out these scripts in the mean time.

When the new options have been worked out that page will be revamped, and probably split into two sections, with much less emphasis on the use of -fx

Existing options lie -contrast and +contrast are just too simple for general use.
which is why they have not been talked about.

however if you like to start another topic with a sample image, and what you like to achieve, then perhaps we can give you more help.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Ravinderjit S.Sidhu

Re: (brightness and contrast on image) query win-command line

Post by Ravinderjit S.Sidhu »

I am windows XP user, and using command line Convert.EXE

Suppose I have an Image I need to set its brightness level to -20% or +20%.
sameway on another Image I need to set its contrast level to -20% or +20%
I need the way how i will do it in IM.
This will be helpfull if you can give examples for each case.

The following I used but I am not sure what I am doing or it is the right way or not.

Code: Select all

convert  flower.png  -fill white  -tint 76    out_cbm080.png
convert  flower.png -sigmoidal-contrast    8,100%   out_cc02.png
convert  flower.png -sigmoidal-contrast    2,0%   out_ct08.gif
Regards
Ravinderjit Singh Sidhu
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: (brightness and contrast on image) query win-command line

Post by anthony »

The correct way to do these things was using -level. however that operator was found to be broken, (and no one complained, probably as I could not get it to work right when I first started IM examples). So was only recently fixed.

Upgrade your IM and try -level to do linear adjustment.

the -tint method is just another way of doing linear color adjustments like -level.
The -sigmodial-contrast is a more natural looking non-linear brightness and contrast adjustment method.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply