Re: [GD-DEVEL] save Grayscale PNG with gd

[email protected] (Pierre)
Newsgroups php.gd.devel
Message-ID <[email protected]>
Hi Dieter,

On Nov 12, 2007 10:45 AM, Dieter Guthmann <[email protected]> wrote:
> Hello,
>
> is it possible to save a GD-created image as grayscale-PNG-File?

Not yet, there is already a patch in our issues tracker to read
GrayScale PNG image (http://bugs.libgd.org/?do=details&task_id=88) but
I did not yet manage to add write support for PNG grayscale images.

The plan is to first add a grayscale internal format (8, 16 or 32,
with alpha or not) and then allow one to save it as a grayscale image
(png, tiff, tga for ex.). Alternatively you can use the grayscale
conversion function to convert the image to a faked grayscale image
and save it as a rgba PNG. It is not the perfect solution but it is
visually correct.

Best,
--Pierre
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.