For Programmers: Free Programming Magazines  


Home > Archive > PHP PEAR Questions and Answers > April 2004 > Image_Color package and bug waiting for a fix









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Image_Color package and bug waiting for a fix
Laurent Laville

2004-04-17, 7:31 am

Hi QA team and PEAR developers

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 !

Laurent Laville
-----------------------
PHP For Ever http://pear.php.net/user/farell
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com