PHP Classes

Glich in setting number of loops

Recommend this page to a friend!

      GIF images into animated GIF with native PHP class  >  All threads  >  Glich in setting number of loops  >  (Un) Subscribe thread alerts  
Subject:Glich in setting number of loops
Summary:I think that there is a glitch in setting the number of loops.
Messages:3
Author:Doug
Date:2007-05-18 10:11:16
Update:2009-05-20 15:24:03
 

  1. Glich in setting number of loops   Reply   Report abuse  
Picture of Doug Doug - 2007-05-18 10:11:16
If you set the number of loops to zero it obviously plays infinite times, but if you set the number of loops to one, it seeps to play 2 times and setting to 2 plays 3 and 3 plays 4 etc.

This is not that bad if you just want to play it 5 times because you just set it to four but you can't make it just play once.

Am I doing something wrong?

Is there a way to sort this?

  2. Re: Glich in setting number of loops   Reply   Report abuse  
Picture of László Zsidi László Zsidi - 2007-06-18 02:54:52 - In reply to message 1 from Doug
Hi,

I just thought every players have difference methods to play animated GIF.
The loop value is a constant and has been stored as a word ( 16 bit ) in the NETSCAPE section.

  3. Re: Glich in setting number of loops   Reply   Report abuse  
Picture of Yves BARDOUT Yves BARDOUT - 2009-05-20 15:24:03 - In reply to message 2 from László Zsidi
Thanks for this class. I saw the function for animation exists in GD2.0 : gdImageGifAnimBegin, gdImageGifAnimAdd
but not in PHP GD documentation, altough I have GD2 installed as an module PHP (php_gd2.dll)

The same issue with loop=1 is true for me viewing the animated gif in:
- Internet Explorer 6
- Mozilla Firefox 3.0.10
- IrfanView 3.98
(All on Windows XP Pro SP2)

On the opposite the same gif is played only once in the Image Preview from Windows XP Pro SP2

Still, is there a reliable way to have the animation loop only once ?

Also, I have not seen information on disposal parameter. I have no clue on the effect of legid values 0, 1, 2, 3.
I noticed that with transparency color = to the background of images, they all stack on each other. When not using images overlays, one should set -1, -1, -1 fopr the RGB parameters in GIFEncoder.