Ilmari Karonen wrote:
What do you need TIFF files for that PNG can't
handle?
TIFF is a container format in two respects: 1) It can hold many
images (pages of a document) in one file, just like a ZIP archive
or a PDF file. This aspect is not supported by MediaWiki today,
but could perhaps be in the future? 2) It can hold images of many
different compression formats. One of these is the CCITT/ITU-T
Group 4 facsimile, a.k.a. "G4", a lossless compression for black
and white (bitonal, not grayscale) images, which is very
space-efficient for scanned images of printed pages.
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.
G4 and JPEG are probably the two most commonly used image
compressions for scanned images inside PDF documents. For a
scanned G4 image, you can easily convert between TIFF and PDF just
by modifying the file header. This is not CPU-intensive, since
you don't need to uncompress the scanned image within.
DjVu and JBIG2 are more recent developments in this area, but have
only very recently become available in open source code. Most
scanners and scanning programs support TIFF G4, which has been
around since the early 1990s. It is well supported by libtiff.
--
Lars Aronsson (lars(a)aronsson.se)
Aronsson Datateknik -
http://aronsson.se