note 93153 added to function.imagerotate
| From: | dev at imglib dot endofinternet dot net | Date: | Tue, 25 Aug 2009 22:15:04 +0000 |
| Subject: | note 93153 added to function.imagerotate | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159892@lists.php.net to get a copy of this message | ||
And you can add a transparent background to you png image by change the
<?php
if ($ignore_transparent == 0) {
imagefill($destimg, 0, 0, imagecolorallocatealpha($destimg, 255,255, 255, 127));
imagesavealpha($destimg, true);
}
?>
to
<?php
if ($ignore_transparent == 0) {
$temp = imagecolorallocatealpha($destimg, 255,255, 255, 127);
imagefill($destimg, 0, 0, $temp);
//if set the default color or white or magic pink then use transparent color
if ( ($bgcolor == 0) || ($bgcolor == 16777215) || ($bgcolor == 16711935) ) {
$bgcolor = $temp;
}
imagesavealpha($destimg, true);
}
?>
----
Server IP: 82.177.164.100
Probable Submitter: 95.134.34.135
----
Manual Page -- http://www.php.net/manual/en/function.imagerotate.php
Edit -- https://master.php.net/note/edit/93153
Del: integrated -- https://master.php.net/note/delete/93153/integrated
Del: useless -- https://master.php.net/note/delete/93153/useless
Del: bad code -- https://master.php.net/note/delete/93153/bad+code
Del: spam -- https://master.php.net/note/delete/93153/spam
Del: non-english -- https://master.php.net/note/delete/93153/non-english
Del: in docs -- https://master.php.net/note/delete/93153/in+docs
Del: other reasons-- https://master.php.net/note/delete/93153
Reject -- https://master.php.net/note/reject/93153
Search -- https://master.php.net/manage/user-notes.php