Re: Image_Color package and bug waiting for a fix
| From: | Stefan Neufeind | Date: | Sat, 17 Apr 2004 11:34:55 +0000 |
| Subject: | Re: Image_Color package and bug waiting for a fix | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-1133@lists.php.net to get a copy of this message | ||
Please note the color2RGB in Image_Graph (as Image_Graph_Color),
which I already proposed to the lead of Image_Color several times. I
also see that Image_Color needs some API-cleanups urgently (to
support alpha-channels etc.). It's been several times that I mailed
the lead, but never got any reply. So if Laurent would volunteer to
take care of Image_Color (and has the time) I'm really much in favor
of this!
Please note that the "recommendation for color representation" (which
is in the PEAR manual) needs maybe to be reworked also. And I think
this is a step that's needed before changes to Image_Color. And I
also think that it's urgent to finalize that recommendation so we can
actually start implementing it, as recommended, in Image_Color,
Image_Text, Image_Graph etc. This would imho be a good thing (tm) :-)
However, I'll shortly post a separate mail for discussion of the
"recommendation for color representation".
Stefan
On 17 Apr 2004 at 12:46, Laurent Laville wrote:
> Almost a month ago i asked how long i should wait before a bug opened
> http://pear.php.net/bugs/bug.php?id=1002
> may be fix.
>
> No reply from package leader, and now
> with recent published of PEAR 1.3.1 ( included PEAR_ErrorStack )
> and Net_FTP 1.3.0 beta2
> i'm ready to publish the first release candidate of HTML_Progress 1.2.0
>
> but how could i manage this last problem with Image_Color bug #1002 not yet
> fixed.
> i've a solution to solve the problem :
>
> change method allocateColor to :
>
> function allocateColor(&$img, $color) {
> $color = Image_Color::color2RGB($color);
>
> return ImageColorAllocate($img, $color[0], $color[1], $color[2]);
> }
>
> and add new method :
> function color2RGB($color)
> {
> $c = array();
> if ($color{0} == '#') {
> $c = Image_Color::hex2rgb($color);
> } else {
> $c = Image_Color::namedColor2RGB($color);
> }
> return $c;
> }
>
> what should we do ? wait again ... or anything else!