Problem with image_text_color #000000

See all posts Reply

Problem with image_text_color #000000 new!
by Vini Key, 18 years, 2 months ago
Hello,
May any body help me on this?
When i put #000000 for the text color seems that not work!!!
And only with that color!!
First i thought that the problem was that the color was a number of zeros, but if i use an another color ( #001500 ), the class work!!!
Can you help me on this please?!?!?
Sorry for my english!!!Reply
Re: Problem with image_text_color #000000 new!
by colin, 18 years, 2 months ago
I will be checking that as soon as possible, and get back to you.Reply
Re: Problem with image_text_color #000000 new!
by colin, 18 years, 2 months ago
Yes, you're right, there is a bug, actually two. It happens that imagecolorallocate() doesn't fill the image if it has been created in true colors. Then if the text is black, it becomes transparent as the background used for the merged text image is also black. A kind of double bug...

I will fix it in the next release. In the meantime, you can change the code as following.

Replace l.2478-2479:
$color = imagecolorallocate($filter, 0, 0, 0);
$text_color = imagecolorallocate($filter ,$red, $green, $blue);

With:
$color = imagecolorallocate($filter, 0, 0, ($blue == 0 ? 255 : 0));
imagefill($filter, 0, 0, $color);
$text_color = imagecolorallocate($filter ,$red, $green, $blue);
Reply
Re: Problem with image_text_color #000000 new!
by vinikey, 18 years, 1 month ago
Thank you my Friend!!!
And congrats for your excellent work!!!
Keep walking!!!Reply
Re: Problem with image_text_color #000000 new!
by colin, 18 years, 1 month ago
You can also use the version 0.21 release candidate. See hereReply