note 106344 added to function.imagefilter
| From: | mail at pedrocandeias dot com | Date: | Sat, 29 Oct 2011 14:20:20 +0000 |
| Subject: | note 106344 added to function.imagefilter | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184215@lists.php.net to get a copy of this message | ||
// With transparent PNG file you can colorize the "positive" items and stand the
transparent has it is - Beta code
<?php
header('Content-Type: image/png');
$im = imagecreatefrompng('image.png');
$width = imagesx($im);
$height = imagesy($im);
$imn = imagecreatetruecolor($width, $height);
imagealphablending($imn,false);
$col=imagecolorallocatealpha($imn,255,255,255,127);
imagesavealpha($imn,true);
imagefilledrectangle($imn,0,0,$width,$height,$col);
imagealphablending($imn,true);
imagecopy($imn, $im, 0, 0, 0, 0, $width, $height);
imagefilter($imn, IMG_FILTER_NEGATE);
// FOR A TRANSPARENT PNG FILE WITH SOMETHING INSIDE, YOU CAN CHANGE THE COLOR HERE: I HAVE RGB: 0,
255, 0
imagefilter($imn, IMG_FILTER_COLORIZE, 0, 255, 0);
imagepng($imn);
imagedestroy($imn);
?>
----
Server IP: 69.147.83.197
Probable Submitter: 81.84.84.119
----
Manual Page -- http://www.php.net/manual/en/function.imagefilter.php
Edit -- https://master.php.net/note/edit/106344
Del: integrated -- https://master.php.net/note/delete/106344/integrated
Del: useless -- https://master.php.net/note/delete/106344/useless
Del: bad code -- https://master.php.net/note/delete/106344/bad+code
Del: spam -- https://master.php.net/note/delete/106344/spam
Del: non-english -- https://master.php.net/note/delete/106344/non-english
Del: in docs -- https://master.php.net/note/delete/106344/in+docs
Del: other reasons-- https://master.php.net/note/delete/106344
Reject -- https://master.php.net/note/reject/106344
Search -- https://master.php.net/manage/user-notes.php