Classes that enable the java imageio system to read and write *.tif (Tagged Image File Format ) files.

In order to read/write tiff files with the java imageio classes we need an ImageWriterSpi, ImageWriter, ImageReaderSpi and ImageReader. Additional to that we need to tell the java imageio system that we have a new ImageWriterSpi and ImageReaderSpi for it. To do this you need to put the file javax.imageio.spi.ImageReaderSpi, javax.imageio.spi.ImageWriterSpi into the folder {$your java programs root directory}/META-INF/services/ or if those files already exist, add the lines uk.co.mmscomputing.imageio.tiff.TIFFImageReaderSpi and uk.co.mmscomputing.imageio.tiff.TIFFImageWriterSpi accordingly.

Motivation to write this class:
The idea was to write a class that can convert sff files into tiff files. Therefore I needed this tiff package to show me the results. And hence that is why this package is biased towards bilevel tiff images.

"The ITU-T T.4 recommendation defines a one-dimensional compression method known as Modified Huffman (MH) and a two-dimensional method known as Modified READ (MR) (READ is short for Relative Element Address Designate). In 1984, a somewhat more efficient compression method known as Modified Modified READ (MMR) was defined in the T.6 recommendation. It was originally defined for use with Group 4 facsimile, so that this compression method has been commonly called Group 4 compression. In 1991, the MMR method was approved for use in Group 3 facsimile and has since been widely utilized." [3]

  1. Read
    This tiff package should be able to read every baseline compatible tiff file and more.
    1. Black & White : no compression, modified huffman, packbits, lzw
    2. Gray 4 & 8 bit: no compression, packbits, lzw
    3. Palette Color 4 & 8 bit: no compression, packbits, lzw
    4. RGB : 888 images : no compression, packbits, lzw, jpeg(7)
    5. CMYK : 8888 images : no compression, packbits, lzw
    6. YCbCr: 888 images : no compression, packbits, lzw, jpeg(7)
    7. Fax G3 T.4 MH-Code, MR-Code, G4 T.6 MMR-Code
  2. Write

    By default the TIFFImageWriter will save the pictures RGB colour coded.
    If you want to save the images as Fax files you need to supply a TIFFImageWriteParam to the TIFFImageWriter.write... methods.
    The TIFFImageWriteParam object can again call upon a TIFFIIOParamController which will pop up a GUI and enables the user to set certain settings. Have a look at the ...imageviewer.ImageTab.save method.

    Photometric InterpretationCompressionSubSampling
    Black-White (WhiteIsZero)MH,MR or MMRN/A
    RGBnone, JPEG1:1:1
    CMYKnone1:1:1:1
    YCbCrnone, JPEG1:1:1;2:1:1

    Using parameters YCbCr,jpeg,2:1:1 and 50% quality is equivalent to the usual jpeg file quality created by many image packages.
    The jpeg encoder uses quantisation values taken from [4] p.143 multiplied by 25 and divided by the value of the quality parameter.

  3. Convert

    How to convert sff files to tif files during fax calls is shown in uk.co.mmscomputing.device.fax.FaxCallSffSaver.

    How to convert line by line black&white image data to tiff files is shown in the uk.co.mmscomputing.device.printmonitor package.

TIFF stands for Tagged Image File Format and is defined in [2].

if you need a bit more TIFF have a look at:
[1] Java(TM) Image I/O API Download Page [last accessed : 2006-08-12]

[2] Tagged Image File Format Version 6 TIFF6.pdf Adobe [last accessed : 2005-07-30]

[3] RFC 2306 - Tag Image File Format (TIFF) - F Profile for Facsimile RFC 2306 [last accessed : 2005-08-26]

[4] 'JPEG' : ISO/IEC IS 10918-1, ITU-T Recommendation T.81 ITU-T81 [last accessed : 2006-01-20]

Projects :
  1. uk.co.mmscomputing.application.imageviewer:
    A simple Multi Page Image Viewer Applet. To view multipage *.sff, *.tiff and *.gif files. Twain and SANE test application.
  2. uk.co.mmscomputing.device.fax:
    mm's computing: Fax System.
  3. uk.co.mmscomputing.device.printmonitor:
    Open Source Project - jprintmonitor : A windows print port monitor written (almost only) in java.When used with an adequate printer driver like the mmsc fax printer,allows users to generate sff and tif fax files via the Windows printing system
  4. uk.co.mmscomputing.imageio.jpeg:
    A few jpeg support classes for the tiff package. Compression mode 7.
  5. uk.co.mmscomputing.io:
    A few io-stream classes. Modified Huffman (MH), Modified READ (MR), Modified Modified READ (MMR), Base-64, PackBits, Little Endian