SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Aug 2006
    0 Post(s)
    0 Thread(s)

    How to convert animated GIF into frames, write on it and then restore it as GIF?

    Hello everybody,

    I hope if this topic is written in the suitable forum.

    Simply, I want to write a script that upload the animated GIF images and write the copyright text of my site on it. I'm using GD library to do that, but the problem is, that the gd library convert the animated gif image into FIXED image after writing. The image lose the animation and become normal gif image.

    I tried to convert the GIF animation into frames and save every frame in a single image, then write what I want on every individual image and finally recombine the frames again to generete the animation. But the the animation lose the correct (timing), I mean the frames repeated with very high spead and without the original timing.

    Is there any method to maintain the animation timing or to write on the animated GIF image using GD without split the frames, please tell me.

    Thanx in advance & I'm waiting from you

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Manchester UK
    158 Post(s)
    3 Thread(s)
    This sounds like a job for imagemagick or a graphics program like PS2 rather than GD.

    GD is good but has it's limitations.
    The imagemagick program is a very powerful server based application that your host may or may not have so you will need to contact them if it doesn't appear on your phpinfo list.

    have a look at for examples

    PS: Welcome to the forums
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    An average geek earl-grey's Avatar
    Join Date
    Mar 2005
    0 Post(s)
    0 Thread(s)
    I have just found that there is MagickWand PHP extension, which allows you to use ImageMagick as functions rather command line tools. Haven't used it myself, though.

  4. #4
    SitePoint Evangelist
    Join Date
    Aug 2005
    0 Post(s)
    0 Thread(s)
    You need a Gif construction application, these applications allow you to disassemble an animated gif frame by frame. You can alter individual frames and then reconstruct the gif. Any of the professional quality apps will allow you to specify timing between frames. A quick Google search netted me results like :
    Alchemy Mindworks GIF Construction Set Professional
    and :
    GIF Animation Tools, Techniques, Examples and Resources
    This second resource contains insight into header information including a special Netscape identifier, that informs the browser how (and how fast) to loop the images.
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts