magick++ image.contrast() problem

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
tomas.pulai

magick++ image.contrast() problem

Post by tomas.pulai »

hi every body. I have some problems with contrast method.

my code is something like this:

Code: Select all


	Image image;
	image.read("./00001162.eml_ATT28373.gif");
	

        image.contrast(255);
        //image.contrast(UINT_MAX);

	image.display();


but no effect. And now i am not sure that it is a bug or i make something wrong.
Can somebody help me..or have somebody some solution??
Last edited by tomas.pulai on 2008-11-29T08:40:25-07:00, edited 1 time in total.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: magick++ image.convert() problem

Post by magick »

It has an effect but it can be subtle depending on the image. The parameter is boolean which says whether to sharpen the image or not. For more dramatic contrast changes you might try sigmoidalContrast().
tomas.pulai

Re: magick++ image.convert() problem

Post by tomas.pulai »

magick wrote:It has an effect but it can be subtle depending on the image. The parameter is boolean which says whether to sharpen the image or not. For more dramatic contrast changes you might try sigmoidalContrast().


thanks it works ;-) ..(why i cant see sigmoidalcontrast in online documentation ?)

And one more question... i want to get 255 or 0 as color (i use grayscale so i need just black or white).
If i use somthing like

Code: Select all

image.sigmoidalContrast(1,LONG_MAX);
i get 255 and 1

Why...how i can make to get 255 and 0 as color???
Post Reply