DJ Mike's Tutorials: PHP

Imagick Functions

^

sigmoidalContrastImage

Description:
bool Imagick::sigmoidalContrastImage ( bool $sharpen , float $contrast , float $mid_point [, int $channel ] )

Adjusts the contrast of an image with a non-linear sigmoidal contrast algorithm. Increase the contrast of the image using a sigmoidal transfer function without saturating highlights or shadows.
Parameters:
sharpen
Set sharpen to TRUE to increase the image contrast otherwise the contrast is reduced.
contrast
Indicates how much to increase the contrast (0 is none; 3 is typical; 20 is pushing it).
mid_point
Indicates where midtones fall in the resultant image (0 is white; 50 is middle-gray; 100 is black).
channel
Provide any channel constant that is valid for your channel mode. To apply to more than one channel, combine channeltype constants using bitwise operators. Defaults to Imagick::CHANNEL_ALL.
Channel constants:
imagick::CHANNEL_UNDEFINED
imagick::CHANNEL_RED
imagick::CHANNEL_GRAY
imagick::CHANNEL_CYAN
imagick::CHANNEL_GREEN
imagick::CHANNEL_MAGENTA
imagick::CHANNEL_BLUE
imagick::CHANNEL_YELLOW
imagick::CHANNEL_ALPHA
imagick::CHANNEL_OPACITY
imagick::CHANNEL_MATTE
imagick::CHANNEL_BLACK
imagick::CHANNEL_INDEX
imagick::CHANNEL_ALL
Return Values
Returns TRUE on success.

Example



<?php
header
("Content-type: image/jpeg");
$image = new Imagick("opossum.jpg"); 
$image->sigmoidalcontrastImage(0350);
echo 
$image;
?> 



<?php
header
("Content-type: image/jpeg");
$image = new Imagick("opossum.jpg"); 
$image->sigmoidalcontrastImage(1350);
echo 
$image;
?> 


^


Was this webpage useful to you? You can support this website by donating.


Created by DJ Mike from Santa Barbara

DJ Mike


<a href="http://www.statcounter.com/" target="_blank"> <img src="http://c5.statcounter.com/counter.php?sc_project=1321035&java=0&security=da2193dc" alt="counter free hit invisible" border="0" /></a>