<?php

/*******************************************************************************
* Software: FPDF GIF Support                                                   *
* Version:  1.0 (based on FPDF 1.53)                                           *
* Date:     2008-11-11                                                         *
* Author:   Tim Böttiger, http://www.phpblogger.net/                           *
* License:  Freeware                                                           *
*                                                                              *
* Projekt-Page:                                                                *
* http://www.phpblogger.net/2008/11/11/fpdf-gif-support-und-font-konverter/    *
*                                                                              *
* You may use and modify this software as you wish.                            *
*******************************************************************************/

class FPDF_gif extends FPDF
{
    function 
_parse_gif($gif_file)
    {
        
$info= array();
        
// Eine temporäre Leerdatei erstellen
        
$tmppngtempnam("/tmp""fpdf_gif");
        
// Die GIF-Datei öffnen
        
$im= @imagecreatefromgif($gif_file);
        if(
$im)
        {
            
// Als PNG in die Temp-Datei speichern
            
imagepng($im$tmppng);
            
// Das PNG parsen und zurückliefern
            
$info$this->_parsepng($tmppng);
        }
        
// Die Temp-Datei löschen
        
unlink($tmppng);

        return 
$info;
    }
}

?>