protected function _convert_gif_to_png($image_url) {
		if ( !function_exists("imagecreatefromgif") ) {
			throw new DOMPDF_Exception("Function imagecreatefromgif() not found.  Cannot convert gif image: $image_url.  Please install the image PHP extension.");
		}

		$old_err = set_error_handler("record_warnings");

		$tmp_img = getImageSize($img_url);
		if ($tmp_img[2] == '1') {
			$img = imagecreatefromgif($img_url);
			if ($img) {
				imageinterlace($img, 0);
				$tmp_filename = tempnam(DOMPDF_TEMP_DIR, "dompdf_img_");
				imagepng($img, $tmp_filename);
				rename($tmp_filename, $tmp_filename.'.png');
				$img_url = $tmp_filename.'.png';
			}
			else {
				$img_url = "../../lib/res/broken_image.png";
			}
		}

		restore_error_handler();

		$this->_image_cache[] = $img_url;

		return $img_url;
	}
protected function _convert_gif_to_png($image_url) {
		if ( !function_exists("imagecreatefromgif") ) {
			throw new DOMPDF_Exception("Function imagecreatefromgif() not found.  Cannot convert gif image: $image_url.  Please install the image PHP extension.");
		}

		$old_err = set_error_handler("record_warnings");

		$tmp_img = getImageSize($img_url);
		if ($tmp_img[2] == '1') {
			$img = imagecreatefromgif($img_url);
			if ($img) {
				imageinterlace($img, 0);
				$tmp_filename = tempnam(DOMPDF_TEMP_DIR, "dompdf_img_");
				imagepng($img, $tmp_filename);
				rename($tmp_filename, $tmp_filename.'.png');
				$img_url = $tmp_filename.'.png';
			}
			else {
				$img_url = "../../lib/res/broken_image.png";
			}
		}

		restore_error_handler();

		$this->_image_cache[] = $img_url;

		return $img_url;
	}
protected function _convert_gif_to_png ( $ image_url ) { if ( ! function_exists ( "imagecreatefromgif" ) ) { throw new DOMPDF_Exception ( "Function imagecreatefromgif() not found.  Cannot convert gif image: $image_url.  Please install the image PHP extension." ) ; } $ old_err = set_error_handler ( "record_warnings" ) ; $ tmp_img = getImageSize ( $ img_url ) ; if ( $ tmp_img [ 2 ] == '1' ) { $ img = imagecreatefromgif ( $ img_url ) ; if ( $ img ) { imageinterlace ( $ img , 0 ) ; $ tmp_filename = tempnam ( DOMPDF_TEMP_DIR , "dompdf_img_" ) ; imagepng ( $ img , $ tmp_filename ) ; rename ( $ tmp_filename , $ tmp_filename . '.png' ) ; $ img_url = $ tmp_filename . '.png' ; } else { $ img_url = "../../lib/res/broken_image.png" ; } } restore_error_handler ( ) ; $ this -> _image_cache [ ] = $ img_url ; return $ img_url ; }
Convert a GIF image to a PNG image

@return string The url of the newly converted image
Convert a GIF image to a PNG image