Reading GIF images in Win2k + Apache + PHP
| From: | Patrick Teague | Date: | Tue, 18 Mar 2003 06:47:08 +0000 |
| Subject: | Reading GIF images in Win2k + Apache + PHP | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-140074@lists.php.net to get a copy of this message | ||
I have a class that reads gif images & can then make jpeg or png thumbnails
of the gif image, but it only seems to work on linux. Is there any way to
open/convert the gif to some other graphic format so I can at least read the
gif image in on windows?
here's the current code I have for reading in file types, but the gif
section blows up. Is there a way with something like readfile() or fopen()
to get the information from a gif file?
switch($type)
{
case "gif":
$orig_img = imagecreatefromgif($filename);
break;
case "jpg":
$orig_img = imagecreatefromjpeg($filename);
break;
case "png":
$orig_img = imagecreatefrompng($filename);
break;
}
Patrick