DJ Mike's Tutorials: PHP

Imagick Functions

^

Imagick::tintImage

Description:
bool Imagick::tintImage ( mixed $tint , mixed $opacity )

Applies a color vector to each pixel in the image. The length of the vector is 0 for black and white and at its maximum for the midtones. The vector weighing function is f(x)=(1-(4.0*((x-0.5)*(x-0.5)))).
Parameters:
tint
String or ImagickPixel object representing the color.
opacity
Float or ImagickPixel object representing the opacity.
Return Values
Returns TRUE on success.
Errors/Exceptions
Throws ImagickException on error.

Example

<?php
header
("Content-type: image/jpeg");
$image = new Imagick("opossum.jpg"); 
$image->tintImage("#ff0088"90);
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>