Re: [GD-DEVEL] Problem filling an image

[email protected] (Brian Peschel) Fri, 07 Nov 2008 14:19:28 -0600
Newsgroups php.gd.devel
Message-ID <[email protected]>
Pierre Joye wrote:
> hi!
>
> On Thu, Nov 6, 2008 at 9:35 PM, Brian Peschel <[email protected]> wrote:
>   
>> I have some class that generates an image through GD.  I new the class for
>> each image I create and I create thousand of images in the life of the
>> program.  I have a problem where the background color is a random color if I
>> set the background color to black (RGB 0,0,0).  It works if I set it to just
>> about anything else (grey RGB 190,190,190 or linen 250,240,230).  The actual
>> fill color is black on the first image I generate (in the lifetime), then it
>> will go random.  I have seen green, blue, red, purple, etc.  I assume this
>> is a problem with GD, as it works with every other color I have tried except
>> black.
>> Any thoughts?
>>     
>
> The code is not complete so hard to say.  Where is define
> backgroundColor? Which language do you use? c++?
>
> Cheers,
>   
Well, this code is in the middle of a rather large application, so I 
can't just give you the code that processes this without giving just 
about everything which I can't do.

But, in the process of trying to rip out enough code to create a demo 
program, I found a bug in my code with a background color of black.  
<sigh> This code is based of of other code I used to create Postscript 
file which works fine, hence my assumption that it was a problem with GD.

Sorry I implied that there was a bug in GD.  But, if Pierre hadn't asked 
for more code, I wouldn't have found my bug.

- B