How would one compress GIF image file in PHP5 ?
I know that its possible to do with JPG like this imagejpeg($resource, $filename, $quality) according to http://us.php.net/manual/en/function.imagejpeg.php
How would one compress GIF image file in PHP5 ?
I know that its possible to do with JPG like this imagejpeg($resource, $filename, $quality) according to http://us.php.net/manual/en/function.imagejpeg.php
JPG is a lossy compression. This means that you can use "quality parameter" to adjust size / quality ratio.
GIF is a lossless compression, you cannot get better compression by adjusting quality.
To create a GIF image use imagegif(...)
http://us.php.net/manual/en/function.imagegif.php
If you want to open a GIF image, look at the function imagecreatefromgif: http://www.php.net/manual/en/function.imagecreatefromgif.php
The result can be passed to imagejpeg to be saved as a JPEG. Depending on the image, this might be pointless.