Re: Mystery of the grey scale images.
by "Jens Brueckmann" <lists(at)j-a-b.net>
|
Date: |
Sun, 03 Oct 2004 10:49:26 +0200 |
To: |
"Nancy Whittley" <nwhittley(at)cinci.rr.com> |
References: |
cwhvpfkq0q7p91 |
|
todo: View
Thread,
Original
|
|
On Sun, 3 Oct 2004 01:20:22 -0400, Nancy Whittley <nwhittley(at)cinci.rr.com>
wrote:
> This one is a mystery to me...
>
> The text descriptions are supposed to be
> grey but the computer cases, and the AMD logos are in color.
> They should show in color, but they are all grey.
>
> Here is the PHP code from one of the systems.
> http://www.jscustompcs.com/image_code1.txt
>
> Can you figure it out?
Hi Nancy,
at first I was quite puzzled as well, but then I took a bath and Heureka!
the problem boiled down to being too simple to believe:
The image created is an indexed image because the initial bg.png is
indexed - but should be truecolor.
Change the color depth of bg.png to truecolor and all is well.
As an alternative you might as well delete the background image and use
these lines instead, which will give you more flexibility:
$image = imagecreatetruecolor(330,250);
$background = imagecolorallocate($image, 255, 255, 255);
imagefill($image,0,0,$background);
Cheers,
jens
--
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA