note 13544 added to ref.image.php
| From: | dufflebunk at hushmail dot com | Date: | Thu, 21 Jun 2001 09:03:20 +0000 |
| Subject: | note 13544 added to ref.image.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-14514@lists.php.net to get a copy of this message | ||
Is there some easier way of flipping an image other than by copying the old one pixel by pixel?
function flip($oldIm)
{
$width=ImageSX($oldIm);
$height=ImageSY($oldIm);
$newIm=ImageCreate($width, $height);
for($i=0; $i<$width; $i++)
{
for($j=0;$j<$height;$j++)
{
ImageCopy($newIm, $oldIm, $i, $j, $i, $height-1-$j, 1, 1);
}
}
return $newIm;
}
http://www.php.net/manual/en/ref.image.php