|
![Picture of luke Picture of luke](/graphics/unknown.gif) luke - 2006-11-03 22:18:55
hey i have used that to produce a animate gif, then used a simple script that loads the image with image GDlib in php. but it keeps saying,
'example.php' is not a valid GIF file
i have used other meathods, i need it to out put it in a way php can 'read it' or out put completttly as a gif file i have tried this
function getAnimation()
{
return $this->fout;
$file_handle = fopen('radimg.gif', 'r+');
fwrite($file_handle, $this->fout);
fclose($file_handle);
}
in the class file but does not produce it in another file, is there any way for this to work, thanks :)
![Picture of László Zsidi Picture of László Zsidi](/graphics/unknown.gif) László Zsidi - 2006-11-06 05:03:37 - In reply to message 1 from luke
Hi,
GifMerge output is a binary stream ( no GD stream ) I just thought try to set the content disposition.
E.g.:
header ( 'Content-disposition: attachment;filename=file.gif' );
![Picture of eddy ammar Picture of eddy ammar](/graphics/unknown.gif) eddy ammar - 2007-01-29 06:00:51 - In reply to message 2 from László Zsidi
HI László, this is a very nice module! So if I need to write the output to a file, can you please give me an example of the codes needed?
I tried using file_put_contents, but the saved image file lose its transparency & its image appears a bit corrupted.
Please help! Thanks a lot.
![Picture of László Zsidi Picture of László Zsidi](/graphics/unknown.gif) László Zsidi - 2007-01-29 20:58:13 - In reply to message 3 from eddy ammar
Hi,
If you want to save animation into a specified file you can easily:
$gif = new GifMerge ( ... );
fwrite ( fopen ( "mygif.gif", "wb" ), $gif->GetAnimation ( ) );
Regards,
László Zsidi
![Picture of eddy ammar Picture of eddy ammar](/graphics/unknown.gif) eddy ammar - 2007-01-30 04:19:02 - In reply to message 4 from László Zsidi
Excellent reply László! Thanks a bunch. And keep up the good work bro!
|