PHP Classes

Not Animated

Recommend this page to a friend!

      GIF images into animated GIF with native PHP class  >  All threads  >  Not Animated  >  (Un) Subscribe thread alerts  
Subject:Not Animated
Summary:I have a script that creates an image however I cannot animate
Messages:4
Author:Matt Nowak
Date:2008-03-07 17:11:55
Update:2008-03-08 07:03:41
 

  1. Not Animated   Reply   Report abuse  
Picture of Matt Nowak Matt Nowak - 2008-03-07 17:11:55
I have a PHP script that creates a single .gif image based upon the parameters you pass to it. However when I call a couple of version of the image ans store the binary data in the array, it only shows the first image.

All the images are the same dimension. I can call the images and get the binary data by the following (Note that URL for the image is stored in a XML doc):

foreach ($allimages as $value) {
$FullFile = "http://xxx/gid/."$value->nodeValue.".gif";
$contents = file_get_contents($FullFile);
$frames [ ] = $contents;
$framed [ ] = 5;
}

$gif = new GIFEncoder(
$frames,
$framed,
0,
2,
0, 0, 0,
"BIN"
);

Header ( 'Content-type:image/gif' );
echo $gif->GetAnimation ( );

Any ideas why it only shoes the first image?

  2. Re: Not Animated   Reply   Report abuse  
Picture of Matt Nowak Matt Nowak - 2008-03-07 17:50:50 - In reply to message 1 from Matt Nowak
Also, if I view the image without the header I see the following after the binary for the image:

;;PHP Notice: Use of undefined constant ERR00 - assumed 'ERR00' in C:\Inetpub\wwwroot\mickeypath\rotator.php on line 47 PHP Notice: Use of undefined constant ERR01 - assumed 'ERR01' in C:\Inetpub\wwwroot\mickeypath\rotator.php on line 47 PHP Notice: Use of undefined constant ERR02 - assumed 'ERR02' in C:\Inetpub\wwwroot\mickeypath\rotator.php on line 47 PHP Notice: Use of undefined constant ERR03 - assumed 'ERR03' in C:\Inetpub\wwwroot\mickeypath\rotator.php on line 47

Thank you in advanced

  3. Re: Not Animated   Reply   Report abuse  
Picture of Matt Nowak Matt Nowak - 2008-03-07 18:35:25 - In reply to message 1 from Matt Nowak
Never mind. I got my answer here under response 4:

phpclasses.org/discuss/package/3163 ...

This script is great. Thanks.

  4. Re: Not Animated   Reply   Report abuse  
Picture of László Zsidi László Zsidi - 2008-03-08 07:03:42 - In reply to message 2 from Matt Nowak
Hi,
The built-in ERRxx string show the type of internal class error.
Thought, should you use "URL" flag instead of "BIN".