Re: [GD-DEVEL] save Grayscale PNG with gd
[email protected] (Dieter Guthmann)
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Pierre, Pierre wrote: > On Nov 12, 2007 10:45 AM, Dieter Guthmann <[email protected]> wrote: > >> 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. Am I right when I guess that the same problem concerns the TIFF or XPM-Format? My original problem is that I need a high-resolution-image in a relative small file in PNM/PGM or XPM-File-Format (PNM is very big when it stores color-images)... When I use the pngtopnm-converter of the netpbm-package to convert from png to pgm/pnm then netpbm creates a (big-sized) pnm-image when the source is in color or it creates a (relativley small-sized) pgm-image when the source-file is in grayscale... Rgds., Dieter