Index: tcpdf.php =================================================================== --- tcpdf.php (revision 308) +++ tcpdf.php (working copy) @@ -2344,6 +2344,17 @@ * @see AddLink() */ public function Image($file, $x, $y, $w=0, $h=0, $type='', $link='') { + // See http://drupal.org/node/130016 + $tmp_img = getImageSize($file); + if ($tmp_img[2] == '1') { + $tmp_filename = tempnam('/tmp/', 'gif4fpdf'.md5(uniqid(rand())) ); + $img = imagecreatefromgif($file); + imageinterlace($img,0); + imagepng($img, $tmp_filename); + rename($tmp_filename, $tmp_filename.'.png'); + $file = $tmp_filename.'.png'; + $type = 'png'; + } //Put an image on the page if(!isset($this->images[$file])) { //First use of image, get info @@ -4277,4 +4288,4 @@ //============================================================+ // END OF FILE //============================================================+ -?> \ No newline at end of file +?>