sigmoidalContrastImage

IMagick is a native PHP extension to create and modify images using the ImageMagick API. ImageMagick Studio LLC did not write nor does it maintain the IMagick extension, however, IMagick users are welcome to discuss the extension here.
Post Reply
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

sigmoidalContrastImage

Post by agriz »

How do i use this function with imagick?

$im->sigmoidalContrastImage(bool $sharpen , float $alpha , float $beta [, int $channel = Imagick::CHANNEL_ALL ]);

How do i replace the values?
Can you give me an example with some numbers?

-sigmoidal-contrast 10,40%
How do i replace this line to sigmoidalContrastImage()
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: sigmoidalContrastImage

Post by fmw42 »

see http://www.imagemagick.org/Usage/color_mods/#sigmoidal for an explanation of alpha and beta. I would set sharpen to off, at first, since it is not in the command line version.

"Where α is the threshold level, and β the contrast factor to be applied."

so that would be like the command line with -sigmoidal-contrast beta,alpha


http://www.imagemagick.org/script/comma ... l-contrast
agriz
Posts: 237
Joined: 2011-10-01T02:21:30-07:00
Authentication code: 8675308

Re: sigmoidalContrastImage

Post by agriz »

Does Imagick have all the commandline equivalent function?

Code: Select all

convert image.jpg -colorspace gray -sigmoidal-contrast 10,40%  -fill "#99cccc" -compose Hardlight  -composite  image.png
convert -size 184x244 xc:transparent image.png  -set option:distort:viewport 184x244   -matte -virtual-pixel transparent  -distort Perspective '0,0,0,39  0,203,36,244  153,0,136,0  153,203,184,224'  -composite  image1.png

Code: Select all

$im->setColorspace(IMGTYPE_GRAYSCALE);
$im->sigmoidalContrastImage(false, 50%,10); // from your reply!
I cant find the equivalent fill function.

//bool Imagick::setImageCompose ( int $compose ) --> WHY int here? Where can i find the integer for Hardlight?

Code: Select all

$im->setImageCompose (HARDLIGHT); ??? 
-composite from the commandline, what happens to that?
In command line itself, what does it do?

There are function for setting the -matte, -virtual-pixel and -distort

How do i create this xc:transparent with widthxheight?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: sigmoidalContrastImage

Post by fmw42 »

Does Imagick have all the commandline equivalent function?
No


Where can i find the integer for Hardlight
Hardlight has no value. It is its own value for the compose method.


I cant find the equivalent fill function.
try http://us3.php.net/manual/en/imagickdra ... lcolor.php


How do i create this xc:transparent with widthxheight?
see http://us3.php.net/manual/en/imagick.newimage.php
Post Reply