Page 1 of 1

magick++ image.contrast() problem

Posted: 2008-11-28T17:54:09-07:00
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??

Re: magick++ image.convert() problem

Posted: 2008-11-28T18:40:11-07:00
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().

Re: magick++ image.convert() problem

Posted: 2008-11-29T03:35:56-07:00
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???