Re: [GD-DEVEL] Newbie transparent gif question- possibly solved.

From: Date: Fri, 02 May 2008 12:57:12 +0000
Subject: Re: [GD-DEVEL] Newbie transparent gif question- possibly solved.
References: 1 2 3 4 5 6 7 8 9  Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-427@lists.php.net to get a copy of this message
On Fri, May 2, 2008 at 2:31 PM, Roger Oberholtzer <roger@opq.se> wrote: > Thanks! Be sure to do one where you Allocate a color more than once, and > set the transparency to one after the first Allocate of the color. Do you understand what I mean by: It uses only the color index with palette images. ? im = gdImageCreate(100,100); for (i=0; I<256;i++) { a[i] = gdImageColorAllocate(im, 255,0,0); } gdImageColorTransparent(im, 23); That will tell GD to use the index number 23 as transparent color. The index is what is stored in the image, and not the color values. It does not matter if the 254 other indexes have the exact same value. Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.gd.devel (#427) next »