Faximum TechNote #071

Faximum TechNote #071

(http://www.faximum.com/technotes/071)

TITLE:    #071 - Information on TIFF File Compatibility

KEYWORDS: tiff tiff-f fax image file compatibility

RELEASE:  All

CLASSIFICATION: All

PROBLEM:  User reports difficulty generating TIFF files using other (i.e.
	  non-Faximum) software that are compatible with Faximum.

CAUSE:    The TIFF standard permits an extremely wide varation in files that
          adhere to the standard.  In order to be fully compliant with Faximum
          the TIFF files must be of Class F (see below).

SOLUTION: The TIFF standard is an extremely flexible and extensible standard
	  for formatting image files.  Images from the simplest uncompressed
	  black and white to the high-resolution compressed 24-bit colour can
	  be encoded as TIFF files.  In order to limit the burden on software
	  that must interprete TIFF files, TIFF files are divided into 
	  different "classes" depending on the type of image that is to be
	  encoded.  Class F TIFF (or TIFF-F) files are used to store fax
	  images.  In order for a TIFF file to be a valid Class F TIFF file
	  it must contain the following tags.

	  In simple English, Faximum will handle most uncompressed or 
	  compressed black and white TIFF images with a resolution of 
	  around 200 dpi.

	  In detail, the following lists the TIFF tags and permitted values
	  for TIFF-F files.  (Note that this list is for information only.
	  Users requiring detailed knowledge of TIFF-F files ought to refer
	  to the TIFF specification itself, available from Aldus Corporation
	  at +1 (206) 628-6593.  A PostScript version of the TIFF specification
	  may be obtained from ftp://ftp.faximum.com/pub/documents/TIFF6.ps).
	  A flat-text version of the TIFF-F extensions to the base TIFF spec
	  may be obtained from ftp://ftp.faximum.com/pub/documents/tiff_f.txt).

	  BitsPerSample [Optional]
		If present, value must be 1.

	  Compression [Optional]
		3 - CCITT T.4 encoding - Recommended

		Faximum will also usually accept images with compression 
		tag values of 1, 2, or 32773.

		If you need support for other compression levels these may
		be available by special arrangement for customers who have
		technical support contracts.

		Otherwise you are recommended to configure the software you
		are using to produce the TIFF files so that they use one
		of the supported compression methods.
	
	  FillOrder [Optional]
		1 or 2
	
	  Group3Options [Optional]
		If present, value must be 0 or 4. (i.e. 1-Dimensional 
		compression only; byte-aligned EOLS optional.)
	
	  ImageLength [Required]
		A normal letter sized page has approx. 1100 scan lines in
		standard resolution and roughly 2200 scan lines in
		fine resolution. Numbers significantly higher or lower
		than this either mean the image is in a resolution that
		in not compatible with faxing or the image is larger or
		smaller than a normal letter sized page.

	  ImageWidth [Required]
		1728 - Recommended

		Faximum will accept images that are narrower.  Faximum will
		truncate images that are wider.  Extremely wide images may,
		however, cause Faximum to overflow its internal buffers.

		Again, images with an ImageWidth significantly larger than
		1728 are probably either at a higher resolution than is
		supported by most fax machines and/or a size that is wider
		than the normal fax machine supports. Either will likely
		cause the resulting faxed image to differ in appearance
		from what is expected.
	

	  NewSubFileType [Optional]
		If present, value must be 0 or 2.

	  Orientation [Optional]
		If present, value must be 1.

	  PageNumber [Optional]
		Value not significant (Faximum processes the pages of a
		multiple-page TIFF file in the order they appear within
		the TIFF file, not in PageNumber order.)

	  PhotometricInterpretation [Optional]
		If present, value must be 0 or 1.

	  PlanarConfiguration [Optional]
		If present, value must be 1.
	
	  Resolution Unit [Optional]
		2 - Recommended

	  RowsPerStrip [Optional]

	  SamplesPerPixel [Optional]
		If present, value must be 1.
	
	  StripByteCounts [Required]
		Actual value must be correct for the file but is not, of
		itself, significant.

	  StripOffsets [Required]
		Actual value must be correct for the file but is not, of
		itself, significant.

	  SubFileType [Optional]
		If present, value must be 1 or 3.
	
	  XResolution  [Required]
		If X resolution is not 200 d.p.i. (+/- 5%) then the image
		may not appear correctly when faxed or used as an
		overlay.
	
	  YResolution [Required]
		If Y resolution is not 100 or 200 d.p.i. (+/- 5%) then the 
		image may not appear correctly when faxed or used as an
		overlay.




	As an aside, the normal width of a TIFF fax image is 1728 pixels.
	Images narrower than that are fine, images wider than that will
	be truncated.  The normal length of a TIFF fax image will depend
	on the Y resolution (usually 100 or 200) and the page length.
	For example, a standard resolution letter page will be 11" x 100 dpi
	or about 1100 scan lines long.  A fine resolution legal page will
	be about 14" x 200 or 2800 lines long.

	If you have a TIFF image and wish to determine the values of the
	tags in its TIFF header, use the "tiffls -l" command.  Tiffls is
	a utility shipped as part of the Faximum software. (Depending on
	the platform and version of your software look in one of the 
	following directories:
		/usr/fax/bin 
		/opt/FAXserver/bin
		/opt/faximum/bin

	The following is an example of the output of "tiffls -l " on a valid
	TIFF-F image produced using the Faximum ASCII to TIFF conversion
	utility.
	==================================================================
	1.tif: Intel format   Version:  42
	  1:
	    NewSubfileType (254)        Long    2
	    ImageWidth (256)    Short   1728
	    ImageLength (257)   Short   1056
	    BitsPerSample (258) Short   1
	    Compression (259)   Short   3
	    PhotometricInterpretation (262)     Short   0
	    FillOrder (266)     Short   1
	    ImageDescription (270)      ASCII   
	    StripOffset (273)   Long    362
	    Orientation (274)   Short   1
	    SamplesPerPixel (277)       Short   1
	    RowsPerStrip (278)  Short   65535
	    StripByteCounts (279)       Long    6166
	    XResolution (282)   Rational        204/1
	    YResolution (283)   Rational        98/1
	    PlanarConfig (284)  Short   1
	    T4Options (292)     Long    4
	    ResolutionUnit (296)        Short   2
	    PageNumber (297)    Short   0  1
	    Software (305)      ASCII   
	    DateTime (306)      ASCII   <2002:11:01 17:39:44>
	    Artist (315)        ASCII   
	    HostComputer (316)  ASCII   
	    FaxImageType (34200)        Long    0
	    Barcode (34203)     ASCII   <...>
	    DID (34204) ASCII   <                >
	    ReceiveTime (34206) Long    0
	    ReceiveDuration (34207)     Short   0
	    Annotation (34208)  ASCII   <...>
		Offset of next ifd: 0
	==================================================================
	  Note that the text fields shown above are for information only
	  and their content is not material.


	The following is another example of the output of "tiffls -l " on 
	a valid TIFF-F image produced using GhostScript.
	==================================================================
	out.tif: Intel format   Version:        42
	  1:
	    NewSubfileType (254)        Long    2
	    ImageWidth (256)    Long    1728
	    ImageLength (257)   Long    2200
	    BitsPerSample (258) Short   1
	    Compression (259)   Short   3
	    PhotometricInterpretation (262)     Short   0
	    FillOrder (266)     Short   2
	    StripOffset (273)   Long    338
	    Orientation (274)   Short   1
	    SamplesPerPixel (277)       Short   1
	    RowsPerStrip (278)  Long    2200
	    StripByteCounts (279)       Long    42205
	    XResolution (282)   Rational        200/1
	    YResolution (283)   Rational        200/1
	    PlanarConfig (284)  Short   1
	    T4Options (292)     Long    4
	    ResolutionUnit (296)        Short   2
	    PageNumber (297)    Short   0  0
	    Software (305)      ASCII   
	    DateTime (306)      ASCII   <2002:11:01 17:34:07>
		Offset of next ifd: 0
	==================================================================

	The following is an example of the output of "tiffls -l " on a
	TIFF image that is not in a format that can be faxed.
	==================================================================
	1:
	    NewSubfileType (254)        Long    2
	    ImageWidth (256)    Short   396
	    ImageLength (257)   Short   612
	    BitsPerSample (258) Short   8
	    Compression (259)   Short   1
	    PhotometricInterpretation (262)     Short   1
	    FillOrder (266)     Short   1
	    DocumentName (269)  ASCII   
	    ImageDescription (270)      ASCII   < Image generated by GNU ...>
	    StripOffset (273)   Long    8  7928  15848  23768  31688  ...
	    Orientation (274)   Short   1
	    SamplesPerPixel (277)       Short   1
	    RowsPerStrip (278)  Short   20
	    StripByteCounts (279)       Long    7920  7920  7920  7920  ...
	    PlanarConfig (284)  Short   1
	    Software (305)      ASCII   
		Offset of next ifd: 0
	==================================================================
	The biggest problem with the file above is that it is not black and
	white but grayscale (i.e. BitsPerSample is not 1).


	If you cannot determine the reason for the incompatibility, please
	fax the output of the "tiffls -l" to Faximum Technical Support for
	analysis.

Tech Note: 071 - Copyright 2002 Faximum Software Inc., All Rights Reserved.
Last Updated: Fri Nov  1 18:49:34 PST 2002
The complete set of Faximum TechNotes are available on the Internet at 
	http://www.faximum.com/TechSupport

Copyright 2001 Faximum Software Inc. All Rights Reserved.