DJ Mike's Tutorials: PHP

ImageMagick Functions

^

Imagick::contrastImage

Description:
bool contrastImage ( bool $sharpen )

Enhances the intensity differences between the lighter and darker elements of the image. Set sharpen to a value other than 0 to increase the image contrast otherwise the contrast is reduced. You can also use TRUE or FALSE.
Parameters:
sharpen
The sharpen value.
Return value
Returns TRUE on success.
Errors/Exceptions
Throws ImagickException on error.

Example




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




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


^


Created by DJ Mike from Santa Barbara

DJ Mike


Dance Away Santa Barbara's Home Page
<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>