Page 1 of 1

to control the contrast level???

Posted: 2009-03-03T20:55:56-07:00
by Bassamdo01
I am using Image::contrast(unsighned int sharpen_). to control the contrast.
but it does not work good, first what he value range of sharpen_?? how to use it

thank you ...
Bassam Alsanie

Re: to control the contrast level???

Posted: 2009-03-04T11:21:01-07:00
by fmw42
Bassamdo01 wrote:I am using Image::contrast(unsighned int sharpen_). to control the contrast.
but it does not work good, first what he value range of sharpen_?? how to use it

thank you ...
Bassam Alsanie

I don't know if this will help (and don't know much about IM APIs), but the command line version of -contrast does not have any parameter. You have to repeat the operation. see http://www.imagemagick.org/script/comma ... p#contrast

Re: to control the contrast level???

Posted: 2009-03-04T16:21:48-07:00
by rmagick
Bassamdo01 wrote:I am using Image::contrast(unsighned int sharpen_). to control the contrast.
but it does not work good, first what he value range of sharpen_?? how to use it
Image::sharpen is defined in Image.cpp. It calls ContrastImage in the MagickCore API. ContrastImage takes a boolean argument. If 1, it increases the contrast. If 0, it decreases the contrast.

In general I've found that the easiest way to figure out the Magick++ API is to read the source code in the Magick++/lib directory. All the Magick++ methods call functions in the MagickCore API (in the magick directory), which is generally well-documented. In any case you can always read the source code.

Re: to control the contrast level???

Posted: 2009-03-10T20:15:24-07:00
by anthony
You can also use -level (and its API equivelent) for a finer control of the contrast operation. There is also the reversed forms of level (+level on command line) I added near the end of last year.