|
![Picture of webshell Picture of webshell](/graphics/unknown.gif) webshell - 2007-02-18 17:49:09
Hello,
everytime I'm using the GIFEncoder constructor with 'C_FILE' as last parameter, I get the following error :
GIFEncoder V2.05: Unintelligible flag ( C_FILE )!
So, I replaced 'C_FILE' with 'url'. Still, nothing is displayed in the following example (I checked my $frames and &framed arrays, they are ok) :
########################################################
$frames = array() ;
$framed = array() ;
if ( $dh = opendir ( "img/en/banner/" ) ) {
while ( false !== ( $dat = readdir ( $dh ) ) ) {
if ( $dat != "." && $dat != ".." ) {
$frames [ ] = "img/en/banner/$dat";
$framed [ ] = 3;
}
}
closedir ( $dh );
}
$gif = new GIFEncoder (
$frames,
$framed,
0,
2,
0, 0, 0,
'url'
);
Header ( 'Content-type:image/gif' );
echo $gif->GetAnimation ( );
########################################################
can you help me please, I really need to have animated gif in php.
thanks in advance,
jim
![Picture of László Zsidi Picture of László Zsidi](/graphics/unknown.gif) László Zsidi - 2007-02-19 04:46:40 - In reply to message 1 from webshell
Hi,
The newest GIFEncoder have difference parameter for source than the older GifMerge versions.
The older versions uses "C_MEMORY" for binary data and "C_FILE" for url data, the newest version uses "bin" for binary data and "url" for url data.
This parameter is not case sensitive.
Do you want a complete new documentation for GIFEncoder?
Regards,
László
![Picture of László Zsidi Picture of László Zsidi](/graphics/unknown.gif) László Zsidi - 2007-02-19 05:12:43 - In reply to message 1 from webshell
I thought to be sure that the playing of animations has been enabled by your browser.
Or try to write content into file /* fwrite ( fopen ( "myanimation.gif", "wb" ), $gif->GetAnimation ( ) ); */ and check the content of generated file.
Waiting for your reply.
Regards,
László
![Picture of webshell Picture of webshell](/graphics/unknown.gif) webshell - 2007-02-19 07:14:42 - In reply to message 2 from László Zsidi
Hi László,
> Do you want a complete new documentation for GIFEncoder?
if there are any important other things to know about the use of this class, it would be kind of you :-)
![Picture of webshell Picture of webshell](/graphics/unknown.gif) webshell - 2007-02-19 07:21:56 - In reply to message 3 from László Zsidi
> I thought to be sure that the playing of animations has been enabled by your browser.
I tested on Opera 9, Firefox 1.5 and Internte Explorer 6.
results :
Opera 9 : blank page (no error, no image)
Firefox 1.5 : an empty image with the broken link icon and the message "The image 'http://localhost/test.php' cannot be displayed, because it contains errors."
Internet Explorer 6 : an empty image with broken link icon.
> Or try to write content into file /* fwrite ( fopen ( "myanimation.gif", "wb" ), $gif->GetAnimation ( ) ); */ and check the content of generated file.
I get a valid Gif image with only the first frame (no animation). My animated gif should have had 3 frames.
Thank you for your help !
jim
![Picture of László Zsidi Picture of László Zsidi](/graphics/unknown.gif) László Zsidi - 2007-02-19 08:52:06 - In reply to message 5 from webshell
If you can please send me your 3 frames. laszlo.zsidi@ge.com
![Picture of philoo Picture of philoo](/graphics/unknown.gif) philoo - 2007-02-24 11:01:18 - In reply to message 2 from László Zsidi
I'm interested in the full documentation, in order to use your class at its full potential...
![Picture of Jan Theodore Picture of Jan Theodore](/picture/user/178805.png) Jan Theodore - 2007-02-25 21:40:36 - In reply to message 2 from László Zsidi
Where can I get the latest version of these? I tried gifs.hu, but that is the same version as PHPclasses.
I have the same problem. I am simply trying to repeat the demo at phpclasses, using those GIF files. This has nothing to do with the browser, I believe, it is the reading which is a problem.
![Picture of Jan Theodore Picture of Jan Theodore](/picture/user/178805.png) Jan Theodore - 2007-02-25 21:47:02 - In reply to message 8 from Jan Theodore
Actually, the problem is not at all in GIFEncoder, it's the Example.php stashed at the phpclasses site. That example passes 'C_FILE' as a parameter to the constructor, not the 'url' as it should.
With that correction this works just fine.
I am interested in more extensive documentation, however.
![Picture of László Zsidi Picture of László Zsidi](/graphics/unknown.gif) László Zsidi - 2007-02-26 03:26:06 - In reply to message 9 from Jan Theodore
Hi,
I'm so sorry, but I am very busy.
The last working version of GIFEncoder can be found at phpclasses.org or http://gifs.hu/phpclasses/show.php?src=GIFEncoder.class.php ( 2.05, with on-line working demo )
The constructor flag for sources has been changed in the new GIFEncoder version.
Mast be used "url" flag instead of "C_FILE" and "bin" instead of "C_MEMORY".
These flags are not case sensitive.
Documentation is under rewriting permanently.
László
|