IM: TIFF - Tagged Image File Format

IM - Imaging Libray

TIFF - Tagged Image File Format
[File Formats]

Description

Copyright (c) 1986-1988, 1992 by Adobe Systems Incorporated.
Originally created by a group of companies, the Aldus Corporation keeped the copyright until Aldus was aquired by Adobe.
TIFF Revision 6.0 Final — June 3, 1992
http://www.adobe.com/Support/TechNotes.html
Access to the TIFF file format uses libTIFF version 3.6.1
http://www.libtiff.org
Copyright (c) 1988-1997 Sam Leffler
Copyright (c) 1991-1997 Silicon Graphics, Inc.

Features

    Data Types: <all>
    Color Spaces: Gray, RGB, CMYK, YCbCr, Lab, XYZ, Map and Binary.
    Compressions: 
      NONE - no compression  [default for IEEE Floating Point Data]
      CCITTRLE - CCITT modified Huffman RLE (binary only) [default for Binary]
      CCITTFAX3 - CCITT Group 3 fax         (binary only)
      CCITTFAX4 - CCITT Group 4 fax         (binary only)
      LZW - Lempel-Ziv & Welch  [default]
      JPEG - ISO JPEG    [default for YCBCR]
      NEXT - NeXT 2-bit RLE (2 bpp only)
      CCITTRLEW - CCITT modified Huffman RLE with word alignment (binary only)
      RLE - Packbits (Macintosh RLE) [default for MAP]
      THUNDERSCAN - ThunderScan 4-bit RLE (only for 2 or 4 bpp)
      PIXARLOG - Pixar companded 11-bit ZIP (only byte, ushort and float)
      DEFLATE - LZ77 variation (ZIP)
      ADOBE_DEFLATE - Adobe LZ77 variation
      SGILOG - SGI Log Luminance RLE for L and Luv (only byte, ushort and float) [default for XYZ]
      SGILOG24 - SGI Log 24-bit packed for Luv (only byte, ushort and float)
    Can have more than one image.
    Can have an alpha channel.
    Components can be packed or not.
    Lines arranged from top down to bottom or bottom up to top.
    Handle() returns a TIFF* of libTIFF.
 
    Attributes:
      Photometric IM_USHORT (1) (when writing this will complement the color_mode information, for Mask, MinIsWhite, ITULab and ICCLab)
      ExtraSampleInfo IM_USHORT (1) (description of alpha channel: 0- uknown, 1- pre-multiplied, 2-normal)
      JPEGQuality IM_INT (1) [0-100, default 75] (write only)
      ZIPQuality IM_INT (1) [1-9, default 6] (write only)
      ResolutionUnit (string) ["DPC", "DPI"]
      XResolution, YResolution IM_FLOAT (1)
      Description, Author, Copyright, DateTime, DocumentName, 
      PageName, TargetPrinter, Make, Model, Software, HostComputer (string)
      InkNames (strings separated by '0's)
      InkSet IM_USHORT (1)
      NumberOfInks IM_USHORT (1)
      DotRange IM_USHORT (2)
      TransferFunction0, TransferFunction1, TransferFunction3 IM_USHORT [gray=0, rgb=012]
      ReferenceBlackWhite IMFLOAT (6)
      WhitePoint IMFLOAT (2)
      PrimaryChromaticities  IMFLOAT (6)
      YCbCrCoefficients IM_FLOAT (3)
      YCbCrSubSampling IM_USHORT (2)
      YCbCrPositioning IM_USHORT (1)
      PageNumber IM_USHORT (2)
      StoNits IM_FLOAT (1) 
      XPosition, YPosition IM_FLOAT (1)
      SMinSampleValue, SMaxSampleValue IM_FLOAT (1)
      HalftoneHints IM_USHORT (2)
      SubfileType IM_INT (1)
      ICCProfile IM_BYTE (N)
      GeoTiePoints, GeoTransMatrix, IntergraphMatrix, GeoPixelScale, GeoDoubleParams IM_FLOAT (N)
      GeoASCIIParams (string)
      (other attributes can be obtained by using libTIFF directly using the Handle() function)

    Comments:
      LogLuv is in fact Y'+CIE(u,v), so we choose to convert to XYZ.
      SubIFD is not handled.
      Since LZW patent expired, we use the libtiff-lzw-compression-kit-1.5 to enable LZW compression.
      LZW Copyright Unisys.
      libGeoTIFF can be used without XTIFF initialization. Use Handle() to obtain a TIFF*.
      Must define in the makefile: JPEG_SUPPORT, ZIP_SUPPORT, PIXARLOG_SUPPORT 
      If your system does not have the definitions u_char, u_short, ...
        you must define BSDTYPES in the makefile when compiling libTIFF.
      Our include file "port.h" simply includes "tiffcomp.h".
      Changed "tiff_jpeg.c" - commented "downsampled_output = TRUE"
      New file tiff_binfile.c