SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    GIF animation with imagegif()

    Hello guys,

    I have an image upload script. When uploading animated GIFs it wont work as it wont show an animation.
    It seems Imagegif() doesn't work on animated gifs (http://www.php.net/imagegif).
    Here is the code,

    Code:
    	$file_ext = $filedata['file_ext'];
    	switch ($file_ext)
    	{
    		case 'gif':
    		{
    			$image = imagecreatefromgif ($file_path . $file_filename);
    
    			header ("Content-Type: image/gif");
    			Imagegif ($image);
    			ImageDestroy ($image);
    
    			break;
    		}
    Does anyone know how i could make this work? (i dont want to use ImageMagick)
    I have limited knowledge about PHP + GD and would appreciate some help

    Thank you in advance

    lawina

    PS: PHP 4.4.1 is installed on the server

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    How bout this...don't use animated anything?
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Member
    Join Date
    Feb 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You think i would've started this topic in the first place if i didn't want the GIFs to be animated ?

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Well gues what? GD can't handle animated gifs.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    Wadge! F4nat1c's Avatar
    Join Date
    Oct 2005
    Location
    South Wales, UK
    Posts
    1,134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth
    Well gues what? GD can't handle animated gifs.
    That's true. It supports jpg, jpeg, png, bmp, but not gif.
    OMFG SitePoint ROXORZ TEH BIG ONE111!
    Wish you were invisible?

  6. #6
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://ffmpeg-php.sourceforge.net/apidoc.php

    Found that link off the imagegif documentation page...
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter


Bookmarks

Posting Permissions

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