Page 1 of 1
gif resize support? Anyone? Anyone?
Posted: Sun Feb 02, 2003 1:58 pm
by bznutz
First of all, with all the gifs that still exist on the net it hardly seems intelligent to remove gif support from GD.
That being said, how do I make dynamic thumbnails of gifs if all I have to work with is GD? Is there a way to suplement with an older library or do I have to completely uninstall my current GD and install the older (I would like to avoid this).
Perhaps someone knows of an algorithm for resizing gifs so I can bypass GD altogether?
Posted: Sun Feb 02, 2003 3:35 pm
by redcircle
Imagemagick has support for the .gif format.
http://www.imagemagick.org
Re: gif resize support? Anyone? Anyone?
Posted: Mon Feb 03, 2003 2:28 am
by twigletmac
bznutz wrote:First of all, with all the gifs that still exist on the net it hardly seems intelligent to remove gif support from GD.
Well they didn't do it because they wanted to. From
http://www.rime.com.au/gd/:
The original GD library allowed developers to manipulate GIF files. It was (and is) open source freeware developed by Thomas Boutell of Boutell.Com, Inc.
As you may or may not be aware, Unisys holds the patents on the LZW compression technology used in GIF files. Despite the fact that they were made open and freely available for several years, and as a result became a de-facto standard, in 1996 (I think) Unisys decided to enforce it's patent.
The result of this is that libraries like GD, which are open source, free development projects, created, basically, out of the good nature of it's original author, could no longer use the GIF format.
As a result, all support for GIF was removed in version 1.6 of the GD library. This is the only correct solution for someone that lives in Canada or the US.
Mac
Posted: Mon Feb 03, 2003 8:34 am
by bznutz
I hate that type of crap.
God bless that company. Right in the mouth.
Posted: Mon Feb 03, 2003 8:41 am
by puckeye
The thing here...
If we un-lzw the gif file do we get anything usable on the PHP stand point? What I mean is that if the gif file is uncompressed could we load the code using
imagecreatefromstring? And then use either imagejpg or imagepng?
Posted: Mon Feb 03, 2003 11:35 am
by bznutz
I don't think so. If I remember correctly the gif is still encoded like a gif eventhough it's decompressed, so to a jpeg engine it would be jibberish.
Or would it?
It's worth a try...
Posted: Mon Feb 03, 2003 2:44 pm
by puckeye
But then what is the use of imagecreatefromstring??
Posted: Mon Feb 03, 2003 4:19 pm
by bznutz
uh, to create a supported format from a string?
Posted: Mon Feb 03, 2003 11:38 pm
by dbcooper
There is an ImageMagick extension (imagick) for PHP available on PEAR:
http://pear.php.net/package-info.php?pacid=76
It is still in beta, but if you have some time to recompile PHP and add the extension to your setup, you can call many of the ImageMagick library functions directly from PHP. From my experience, ImageMagick still fully supports GIF files, but it
does not use the patented compression method.
In a nutshell, this means that the GIFs you output will be much larger. You will likely have better results saving the resized images as PNGs (if you need non-lossy compression), but I don't know your exact situation and requirements.
-db
Posted: Tue Feb 04, 2003 9:58 am
by bznutz
That sounds good. I will see if there are any windows php dlls for that.
Recompiling is a bad thing in Windows, generally. If I still had my Linux server I would recompile in a second.
Posted: Tue Feb 04, 2003 2:27 pm
by puckeye
bznutz wrote:uh, to create a supported format from a string?
I understand that, but where does that string come from? A database?