Re: Transparent image resizing using php 4.4.x
| From: | Richard Lynch | Date: | Sun, 10 Jun 2007 23:38:15 +0000 |
| Subject: | Re: Transparent image resizing using php 4.4.x | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-256575@lists.php.net to get a copy of this message | ||
On Sun, June 10, 2007 12:08 pm, tedd wrote:
> At 1:12 AM +0500 6/10/07, Sukhwinder Singh wrote:
>>-snip-
>>Could anyone please provide me a solution which works using php 4.4.x
>>
>>Sukhwinder Singh
>
> Instead of:
>
> imagecolortransparent($img_resized, $transparent);
>
> try:
>
> imagecolortransparent($img,imagecolorat($img,0,0));
>
> Look-up imagecolorat().
I suspect that in various versions of GD, you may have troubles
switching from a GIF (256 color pallette) to TrueColor (millions of
colors) and back again...
GD may well attempt to anti-alias, de-speckle, or who knows what in
either of those transitions.
I would suggest that you create images with the pallette[s] you want,
and see if you get more consistent results.
--
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?