Re: Shrinking gifs.. .
| From: | Martin Norland | Date: | Wed, 22 Jun 2005 13:48:52 +0000 |
| Subject: | Re: Shrinking gifs.. . | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-39741@lists.php.net to get a copy of this message | ||
nikos wrote:
Thank you Martin I install new gd, reconfigure php and now is running OK. But, it was a mass to realize that shortening gifs results to loss transparency(!). [snip]imagecolortransparent() That function will set the transparent color in an image (only one per image). If you read the description carefully it says that it will return the existing one if you don't specify a new color... so: $transparent_color = imagecolortransparent($uploaded_img); imagecolortransparent($thumbnail, $transparent_color); That should get you and Nadim what you're looking for, assuming things work as promised (I've never used it myself). If you need to work with pngs and the likes, imagecolorexactalpha / imagecolorclosestalpha - requires GD 2.01 and PHP 4.0.6 (imagecolorallocatealpha requires PHP 4.3.2 though, oddly enough) cheers, -- - Martin Norland, Sys Admin / Database / Web Developer, International Outreach x3257 The opinion(s) contained within this email do not necessarily represent those of St. Jude Children's Research Hospital.