Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Details for ghostscript devices png16, png16m, etc.?

1,226 views
Skip to first unread message

andymh...@gmail.com

unread,
Mar 23, 2014, 11:39:41 PM3/23/14
to
I am using ghostscript 9.10 under cygwin. My end goal is to convert 1 PDF page to png (a black and white tax form that I want as a backdrop in an Excel spreadsheet, ugh). The ghostscript install comes with html help files, which do not really describe in detail the differences between the devices png16, png16m, and pnggray, and pngmono. I want either a black & white rendering (ballpark 200dpi) or possibly a gray rendering if it creates a readable image at less DPI. I'll use the gray rendering if the reduction in DPI is enough to create a smaller file.

I'm assuming that one of the devices I mentioned is the desired one, but I was wondering whether there are articulated details online that differentiate them.

andymh...@gmail.com

unread,
Mar 23, 2014, 11:54:55 PM3/23/14
to
Actually, there's no gray using device pnggray. I guess there's no
anti-aliasing interpolation with filtering. Or if there is, it
requires delving into the ghostscript options. Given the time I have
to do this (none), I ended up using pngmono with -r150. For the
curious, the PDF http://www.cra-arc.gc.ca/E/pbg/tf/t2036/t2036-13e.pdf
(it will probably change annually).

Thanks anyway!

ken

unread,
Mar 24, 2014, 3:52:01 AM3/24/14
to
In article <a0ebf1f9-549b-4154...@googlegroups.com>,
andymh...@gmail.com says...
>
> I am using ghostscript 9.10 under cygwin. My end goal is to convert 1 PDF page to png (a black and white tax form that I want as a backdrop in an Excel spreadsheet, ugh). The ghostscript install comes with html help files, which do not really describe in detail the differences between the devices png16, png16m, and pnggray, and pngmono.

From the doc file 'Devices.htm', Section 3.1 PNG file format :

"Ghostscript provides a variety of devices for PNG output varying by bit
depth. For normal use we recommend png16m for 24-bit RGB color, or
pnggray for grayscale. The png256, png16 and pngmono devices
respectively provide 8-bit color, 4-bit color and black-and-white for
special needs. The pngmonod device is also a black-and-white device, but
the output is formed from an internal 8 bit grayscale rendering which is
then error diffused and converted down to 1bpp."



Ken

andymh...@gmail.com

unread,
Mar 30, 2014, 10:38:37 PM3/30/14
to
On Monday, March 24, 2014 3:52:01 AM UTC-4, ken wrote:
>In article <a0ebf1f9-549b-4154...@googlegroups.com>,
>andymhancockATgmail.com says...
Thanks, Ken. I was looking right at it. Went to the PNG site and
everything, and scrutinized the example commands. I must have been in
a partial coma to have missed the central paragraph that you quoted.
0 new messages