php5-gd imagecolorset no longer working properly after upgrade to 9.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
php |
Unknown
|
Unknown
|
|||
php5 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: php5
I wrote a small piece of code using that uses the php5-gd module. The script takes a grayscale PNG and modifies it's index to use 256-color lookup table then outputs it as an 8-bit JPEG image, or 8-bit paletted PNG. Since upgrading Ubuntu from 8.10 to 9.04, however, the script only outputs grayscale images, with no error message.
Outputting the results from imagecolorsforindex shows that the script is still reading the palette properly, so it must have something to do with the next step (imagecolorset).
Any ideas?
I've attached some example images used in the script below, as well as the resulting image from before and after the upgrade.
$gd = imagecreatefrom
$ctable = imagecreatefrom
for ($i = 0; $i <= 255; $i++) {
$rgba = imagecolorsfori
imagecolorset($gd, $i, $rgba["red"], $rgba["green"], $rgba["blue"]);
}
imagejpeg($gd, "eit_final.jpg", 75);
imagedestroy($gd);
imagedestroy(
Changed in php5 (Ubuntu): | |
status: | Incomplete → New |
Update: Bug also found to exist in other systems (tested Fedora 11 Beta).
Reported upstream: http:// bugs.php. net/bug. php?id= 48123