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

From: Date: Mon, 12 Nov 2007 10:48:23 +0000
Subject: Re: [GD-DEVEL] save Grayscale PNG with gd
References: 1 2 3  Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-279@lists.php.net to get a copy of this message
Hi Dieter, On Nov 12, 2007 11:40 AM, Dieter Guthmann <mailing-deg@bup-nbg.de> wrote: > Am I right when I guess that the same problem concerns the TIFF or > XPM-Format? It is nearly the same issue with PNG except when you use a palette based image. However it will be slow as you have to first convert to grayscale and then convert the image to a palette image. > 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... I can come with a patch later this week or during the weekend. Adding an option to force libpng to write a grayscale image is relatively easy. Or you may try yourself if you feel motivated enough, contributions are always welcome :) Best, --Pierre

« previous php.gd.devel (#279) next »