Alfio Puglisi wrote:
On 12/2/06, Lars Aronsson <lars(a)aronsson.se>
wrote:
For example, the image
http://runeberg.org/img/nfad/0670.4.png is
240 kbytes in 150 dpi 16-level grayscale PNG but only 200 kbytes
in 600 dpi bitonal TIFF G4. The difference between 150 dpi
grayscale and 600 dpi bitonal becomes very clear when you try to
print the page on a 600 or 1200 dpi laser printer.
Well, you should compare apples to apples. The image you specified
becames only 58 kbytes wen saved as 1-bit (bitonal) PNG. And bitmapped
formats like PNG and TIFF have no concept of "dpi"- that's an external
manipulation made by the printing program. You need to compare images
with the same pixel sizes.
Sorry for the confusion. Allow me to clarify this.
Were you able to read the text from that 58 kbyte image?
This page was original scanned in 600 dpi bitonal and saved as
TIFF G4, a format supported by most scanner software. The image
is 3616x5550 pixels and the resulting file is 196 kbyte. You can
get it here:
http://runeberg.org/img/nfad-0670.tif
Since most web browsers don't support TIFF, and since 600 dpi is
nowhere near the resolution of most computer screens, the web
presentation uses a downscaled (by a scale factor 1:4) grayscale
image instead. The conversion process is roughly:
tifftopnm | pngscale .25 | ppmquant 16 | pnmtopng
In the resulting image, now 200 kbytes, every 150 pixels
correspond to one inch of the printed page, from which it was
originally scanned. Thus, I'm using the shorthand terminology
that this is now a 150 dpi image. Since most computer screens
have a resolution in the rage 100-120 dpi, this means the image is
displayed a little "larger than life".
Scanning at 600 dpi is something of a standard for printed text.
Many scanned books can then be displayed on screen in 120 dpi
(downscale 1:5), but this book (an encyclopedia) has small print
which is more readable in 150 dpi.
You suggest the original TIFF image could be saved as a 1-bit PNG
instead, and this is true. The conversion process is:
tifftopnm | pnmtopng
The resulting image 404 kbytes or twice as large as the TIFF G4
image. You can get this at
http://runeberg.org/img/nfad-0670.png
--
Lars Aronsson (lars(a)aronsson.se)
Aronsson Datateknik -
http://aronsson.se