Convert gif to jpeg on the fly using gd?
| From: | Brent Clements | Date: | Mon, 30 Aug 2004 00:02:53 +0000 |
| Subject: | Convert gif to jpeg on the fly using gd? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-195135@lists.php.net to get a copy of this message | ||
I have a class that only accepts jpegs and png's but all of my images(we have over 200 of them)
are in gif format.
Is there a way to convert from gif to jpeg on the fly without outputting the new image to file or
the screen or using a system call to run the gif2XXX utilities?
I've tried imagejpeg(imagecreatefromgif($image)) but it outputs the image to the html screen as
it should.
Granted, I could pull some neat output buffering trick but I want to know if you guys think there is
an easier way. And if so, point me in the right direction
Thanks,
Brent