ImageGear for Java
TIFF

Full Name TIFF (Tagged Image File Format)
Format ID ImGearFormats.TIF
File Extension(s) *.tif, *.tiff
Data Type Raster Image
Data Encoding Binary
IG Multipage Support Yes
IG Alpha Channel Support Yes
IG Platforms Support WIN32, WIN64, Linux32, Linux64, MAC32, MAC64

ImageGear Supported Versions

ImageGear Supported Features

ImageGear Read Support

To use LZW (Lempel-Ziv-Welch) Compression compression scheme com.accusoft.imagegear.formats package should be attached.

ImageGear Write Support

TIFF writer requires read/write access to the output stream.

ImageGear Filter Control Parameters

Filter Control Parameter Type Default Value Available Values Description
BigEndian boolean false

false,

true

If true , big endian order is used for write operation ("MM"), in other case little endian is used ("II").
BitonalPaletteMode ImGearTIFFBitonalPaletteMode Enumeration ImGearTIFFBitonalPaletteMode.LEGACY An ImGearTIFFBitonalPaletteMode Enumeration value Specifies whether ImageGear shall fix strange looking palettes when reading bitonal TIFF images.
FillOrder ImGearFillOrder Enumeration ImGearFillOrder.MSB An ImGearFillOrder Enumeration value Specifies fill order (most significant bit first, less significant bit first) to use for writing the TIFF file.
ImageBeforeIFD boolean false false, true This flag specifies physical location of raster data inside TIFF file relatively to IFD record. If this value is true then image data is to be written before IFD record.
IncludePageNumber booleane true false, true If this parameter is true then include tag 297 into TIFF image with real value of page number.
LoadFirstUnknownChannelAsPAlpha boolan true true, false This parameter specifies how to load first extra channel if ExtraSamples tag is missing. If LoadFirstUnknownChannelAsPAlpha is True, IG loads first extra channel as Premultiplied Alpha channel. This mode provides support for RGBPA TIFF images written by earlier versions of ImageGear. If LoadFirstUnknownChannelAsPAlpha is False, IG loads all extra channels as extra channels.
MissingCompression ImGearCompressions Enumeration ImGearCompressions.AUTO An ImGearCompressions Enumeration value Compression to use for image loading, if compression tag is missing in the image.
Save70 boolean true false, true If this value is true then output TIFF-JPEG image will be produced in TIFF 7.0 compatible format but in other case it will be compatible with TIFF 6.0.
SaveClassF boolean false false, true If this value is true then image to be written in TIFF format compatible with class F requirements.
SaveEXIFMetadata boolean false true, false If this parameter is true EXIF metadata is saved with TIFF file.
SaveExistingEXIFMetadata boolean true true, false

This parameter controls the saving of existing EXIF metadata.

By default (SaveEXIFMetadata = false, SaveExistingEXIFMetadata = true), ImageGear saves EXIF metadata if it exists in the source page, and does not save EXIF metadata if it does not exist in the source page.

SavePlanar boolean false false, true Specifies tag value 284 for output image.
StripBufferSize int 32768 Any positive value If StripMode is ImGearStripModes.FIXED_BUFFER, this specifies the buffer size to be used for writing of each strip.
StripCount int 1 Any positive int value, not greater than image height. If StripMode is ImGearStripModes.FIXED_COUNT, this specifies the number of strips for saving the TIFF image.
StripMode ImGearStripModes Enumeration ImGearStripModes.FIXED_COUNT An ImGearStripModes Enumeration value Specifies strip or tile saving mode for the TIFF image. By default, ImageGear saves TIFF files with one strip.
SubIFDPath String Empty string Any string value Path of the SubIFD to load the image from. If set to empty string (default), load image from root IFD.
TileHCount int 10 Any positive int value, not greater than image width. If StripMode is ImGearStripModes.TILED_FIXED_COUNT, this specifies the number of tiles in horizontal dimension.
TileHeight int 64 Any positive int value, not greater than image height If StripMode is ImGearStripModes.TILED_FIXED_SIZE, this specifies the height of each tile.
TileVCount int 10 Any positive int value, not greater than image height If StripMode is ImGearStripModes.TILED_FIXED_COUNT, this specifies the number of tiles in vertical dimension.
TileWidth int 64 Any positive int value, not greater than image width If StripMode equals ImGearStripModes.TILED_FIXED_SIZE, this specifies the width of each tile.

SaveExistingEXIFMetadata works in combination with SaveEXIFMetadata parameter, as shown in the table below:

SaveEXIFMetadata SaveExistingEXIFMetadata Source Page has EXIF metadata ImageGear Action
false false No Does not save EXIF metadata
false false Yes Does not save EXIF metadata
false true No Does not save EXIF metadata
false true Yes Saves existing EXIF metadata
true false No Saves default EXIF metadata
true false Yes Ignores existing and saves default EXIF metadata
true true No Saves default EXIF metadata
true true Yes Saves existing EXIF metadata

Comments

TIFF was developed for use in storing black-and-white images from scanners and desktop publishing applications. Now, in its fourth release (version 6.0), it is one of the most detailed and versatile bitmap formats in use. It is supported by most art, imaging, and word-processing applications. It supports several compression schemes. Aside from saving image data in bitmap form, it can also contain vector or text-based images.

Containing just three fields, the TIFF header is simple and one of the shortest of all the graphics file format headers. But, the structure of a TIFF is complicated, with variable length fields, variable number of fields, and the ability to store information (other than the header) in any order desired.

The other two major components of the TIFF format are "Image File Directories" (IFDs) and the image or images themselves. There is one IFD per image stored. The combination of an IFD and an image is referred to as a "subfile". The header contains an offset pointer to the first IFD. If there are multiple IFDs, each contains an offset to the next. The last IFD contains a value that signifies the end of the file.

IFDs closely resemble a header structure, and the information stored in them is often referred to as "TIFF Header Information". Unlike a header, however, they contain a variable number of "tags" (pointers or fields). In addition, each tag can point to data with a variable length. TIFFs are notorious for the number of tags that they can contain, up to a maximum of 65,535 tags of nearly 100 different types (version 6.0). Tags are listed in order by code number so that a TIFF reader can easily determine what fields are present. While ImageGear reads and stores all TIFF tags, it utilizes a subset of all of the possible tags. See note on previous page.

In version 5.0, the presence of certain subgroups of tags determined what "class" the TIFF belonged to. The classes are: TIFF-B-monochrome, TIFF-F-fascimile, TIFF-G-grayscale, TIFF-P-palette based, TIFF-R-RGB color, TIFF-X-any class, TIFF-Y-can use JPEG compression. Version 6.0 uses tags to divide the TIFF type into different file configurations, leaving behind the class concept. Version 6.0 configurations are: Bilevel, palette color, RGB, grayscale, YCbCr, and Class F (facsimile).

TIFF bitmap data can be stored in one of two configurations: strips or tiles. Strips are groups of adjoining rows of bitmap data, and can be found in version 5.0 and 6.0 files. Tiles were new to TIFF version 6.0. They are rectangular or square sections of bitmap data. The method of storage is determined in part by what kind of compression (if any) is used. JPEG compression can handle tiled images. Due to the need for padding with tile storage, tiling is not usually efficient for small images.

ImageGear supports the following compression schemes for TIFF:

See the ImageGear Supported Compressions Reference for descriptions of these compression types. The compression tag of the IFD tells whether the image is compressed, and by what method. (Not all TIFF files can use JPEG compression. It is supported by version 6.0, but in version 5.0, only a "Y" class TIFF can use JPEG).

TIFF/EP

TIFF/EP format was designed to provide a means for storing "raw" (unprocessed) image from digital camera's sensor.

TIFF/EP allows you to store several versions of the same image in one file. Typically, TIFF/EP image includes a small preview and a raw image. It can also include a larger or full-size preview, or some other variations of the image.

TIFF/EP uses IFD trees for storing different versions of image. This is different from IFD chains that are used in baseline TIFF to store multiple pages.

ImageGear does not detect TIFF/EP as a separate file format. In ImageGear for Java, a TIFF/EP file is detected as TIFF file. However, in ImageGear for Java, a TIFF/EP file can be recognized as a known Raw format and loaded as DCRAW or AdobeDNG.

Most of digital cameras store pixels in "mosaic" format. At a given pixel location either a Red, Green, Blue, Cyan, or some other color sample value is recorded. Such images are referred to as "Color Filter Array" type. TIFF/EP format uses a two-dimensional matrix called "Color Filter Array pattern" to describe positions of pixels of particular color in the mosaic image. In order to recreate the full color values in each pixel, it is necessary to interpolate intensities of neighboring pixels.

Note:
ImageGear for Java does not support color reconstruction of TIFF/EP images. ImageGear for Java can however reconstruct TIFF/EP image, if they are detected to be a DCRAW or Adobe DNG image.

To enable loading images from TIFF SubIFDs, a new control parameter is added to TIFF filter: "SUBIFD_PATH". This parameter has the type of String, and its default value is "" (empty string). By default, ImageGear loads the image in the root IFD (thumbnail). If "SUBIFD_PATH" string begins with a number, then ImageGear loads the image from the corresponding SubIFD of the root IFD. For example, if SUBIFD_PATH is set to "3", ImageGear will load the image from the 3rd SubIFD.

SUBIFD_PATH parameter also affects metadata reading. Metadata is loaded starting from the IFD specified by SUBIFD_PATH.

References Used

Brown, C. Wayne, and Barry J. Shepherd. Graphics File Formats: Reference and Guide. Greenwich, CT.: Manning Publications, 1992.

Kay, David C. and John R. Levine. Graphics File Formats. Windcrest Books, 1992.

Murray, James D. "Graphic Image Format FAQ 3-4". James D. Murray, 1994-1996.

Murray, James D. and William vanRyper. Encyclopedia of Graphics File Formats. Sebastopol, CA: O'Reilly & Associates, Inc., 1994.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback