Public bug reported:

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       = imagecreatefrompng("eit_grayscale.png");
$ctable = imagecreatefrompng("ctable_eit304.png");

for ($i = 0; $i <= 255; $i++) {
        $rgba = imagecolorsforindex($ctable, $i);
        imagecolorset($gd, $i, $rgba["red"], $rgba["green"], $rgba["blue"]);
}

imagejpeg($gd, "eit_final.jpg", 75);
imagedestroy($gd);
imagedestroy($ctable);

** Affects: php5 (Ubuntu)
     Importance: Undecided
         Status: New

-- 
php5-gd imagecolorset no longer working properly after upgrade to 9.04
https://bugs.launchpad.net/bugs/368036
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to