Subject: | trueColor(1) produces images with black boxclr instead of white |
(also blogged at http://taint.org/2005/10/28/210641a.html )
Hacking on a new rule-QA subsystem for SpamAssassin, I came across this bug in GD::Graph. If:
* you are drawing a graph using GD::Graph;
* outputting in PNG or GIF format;
* and the box area the margins outside the graph keeps coming up as black, instead of white as youve specified;
check your code for calls to GD::Image->trueColor(1);, or the third argument to the GD::Image->new() constructor being 1. It appears that theres a bug in the current version of GD (or GD::Graph) where graphing to a true-colour buffer is concerned, in that the box area continually comes out in black.
* Test script (requires GD, GD::Graph): http://taint.org/xfer/2005/demo-gd-graph-bug.pl.txt
* Demo PNG with trueColor set to 1: http://taint.org/xfer/2005/demo-gd-graph-borked.png
* Demo PNG with trueColor set to 0: http://taint.org/xfer/2005/demo-gd-graph-works.png
(Seen in versions: perl 5.8.7, GD 2.23, GD::Graph 1.43 on Linux ix86; perl 5.8.6, GD 2.28, GD::Graph 1.43 on Solaris 5.10.)