note 68873 added to function.imagegif
| From: | rokfaith at gmail dot com | Date: | Mon, 14 Aug 2006 13:33:44 +0000 |
| Subject: | note 68873 added to function.imagegif | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-115892@lists.php.net to get a copy of this message | ||
I've recieved e-mails on this, so i will elaborate (original post ~2 posts down):
the RenderFrame($frame) function should be a function that returns an image resource and does
something sensibe with the integer (frame number) that it gets passed.
function RenderFrame($frame) {
$im = imagecreatetruecolor(100,100); //or just imagecreate for smaller images
imageantialias($im, true); //works only on true color images, slower
//draw something on image (imageline, imagerect, imageftt...)
return $im;
}
this way the image is drawn and destroyed every iteration of the loop, so you can animate moving
things, eg. text. if you keep the image between function calls, you get the effect of progressively
drawing the image:
change
$im = imagecreatetruecolor(100,100);
into
static $im = imagecreatetruecolor(100,100);
----
Server IP: 217.72.76.79
Probable Submitter: 194.152.23.195
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.imagegif.php
Edit -- https://master.php.net/note/edit/68873
Del: integrated -- https://master.php.net/note/delete/68873/integrated
Del: useless -- https://master.php.net/note/delete/68873/useless
Del: bad code -- https://master.php.net/note/delete/68873/bad+code
Del: spam -- https://master.php.net/note/delete/68873/spam
Del: non-english -- https://master.php.net/note/delete/68873/non-english
Del: in docs -- https://master.php.net/note/delete/68873/in+docs
Del: other reasons-- https://master.php.net/note/delete/68873
Reject -- https://master.php.net/note/reject/68873
Search -- https://master.php.net/manage/user-notes.php