note 99443 added to function.imagecopy
| From: | elpie dot sote dot pl at osu1 dot php dot net | Date: | Wed, 18 Aug 2010 06:52:58 +0000 |
| Subject: | note 99443 added to function.imagecopy | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-171789@lists.php.net to get a copy of this message | ||
I have php4 in my hosting and this function didn't work, maybe i need PHP5 ????????
<?php
function backgroundify(&$image) {
$ix = imagesx($image);
$iy = imagesy($image);
$ixhalf = floor($ix / 2); // DON'T USE ON IMAGES WITH ODD SIZES!
$iyhalf = floor($iy /2);
$panel_temp = ImageCreate ($ix, $iy) or die("Cannot Initialize new GD image stream");
imagecopy($panel_temp, $image, 0,0,0,0,$ix, $iy);
imagecopy($image, $panel_temp, 0,0,$ixhalf,$iyhalf, $ix-$ixhalf, $iy-$iyhalf); // move bottom
right to top left
imagecopy($image, $panel_temp, $ixhalf,$iyhalf, 0,0,$ix-$ixhalf, $iy-$iyhalf); // top left to
bottom right
imagecopy($image, $panel_temp, $ixhalf, 0,0,$iyhalf,$ix-$ixhalf, $iy-$iyhalf); // bottom left to
topo right
imagecopy($image, $panel_temp, 0,$iyhalf, $ixhalf,0,$ix-$ixhalf, $iy-$iyhalf); // top left to
bottom right
}
?>
elpie.sote.pl
----
Server IP: 195.114.0.19
Probable Submitter: 95.51.130.74
----
Manual Page -- http://www.php.net/manual/en/function.imagecopy.php
Edit -- https://master.php.net/note/edit/99443
Del: integrated -- https://master.php.net/note/delete/99443/integrated
Del: useless -- https://master.php.net/note/delete/99443/useless
Del: bad code -- https://master.php.net/note/delete/99443/bad+code
Del: spam -- https://master.php.net/note/delete/99443/spam
Del: non-english -- https://master.php.net/note/delete/99443/non-english
Del: in docs -- https://master.php.net/note/delete/99443/in+docs
Del: other reasons-- https://master.php.net/note/delete/99443
Reject -- https://master.php.net/note/reject/99443
Search -- https://master.php.net/manage/user-notes.php