Re: Re: Images-weird!!
| From: | Pierre-Alain Joye | Date: | Sun, 02 Feb 2003 23:33:32 +0000 |
| Subject: | Re: Re: Images-weird!! | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25354@lists.php.net to get a copy of this message | ||
On Sun, 02 Feb 2003 15:29:44 -0800 (PST)
Mihail Bota <mbota@almaak.usc.edu> wrote:
> Yeah, I had the idea with truecolor, but I do not have GD2 installed.
> I have to install it, first.
> Still, I do not understand! I only have 13 colors, why is allocating
> only 255? I am not using the indexes in the color allocation.
palette based image (imagecreate) can use a maximum of 256 colors. You
allocate a new color in each iteration of the inside loop, 16*16=256
and greater than 255, do not forget you have already one color allocated
for the background color, btw, you do no need to draw a white box with a
palette image, the 1st allocated color is the background color.
hth
pierre