based resolutions and the corresponding paper sizes [T.30].
+--------------------------------+---------------------------+
| XResolution x YResolution | ImageWidth |
+--------------------------------+---------------------------+
| 100 x 100 | 864 | 1024 | 1216 |
+--------------------------------+---------------------------+
| 200 x 200 | 1728 | 2048 | 2432 |
+--------------------------------+---------------------------+
| 300 x 300 | 2592 | 3072 | 3648 |
+--------------------------------+---------------------------+
| 400 x 400 | 3456 | 4096 | 4864 |
+--------------------------------+---------------------------+
|Letter,A4| B4 | A3 |
| Legal | | |
+---------------------------+
| Paper Size |
+---------------------------+
6.2.2 Extension Fields
The JPEG compression standard allows for the a*b* chroma components of
an image to be subsampled relative to the L* lightness component. The
extension fields ChromaSubSampling and ChromaPositioning define the
subsampling. They are the same as YCbCrSubSampling and YCbCrPositioning
in [TIFF], but have been renamed to reflect their applicability to other
color spaces.
ChromaSubSampling(530). SHORT
Count = 2
Specifies the subsampling factors for the chroma components of a
L*a*b* image. The two subfields of this field, ChromaSubsampleHoriz
and ChromaSubsampleVert, specify the horizontal and vertical
subsampling factors respectively.
SHORT 0: ChromaSubsampleHoriz = 1, 2.
1: equal numbers of lightness and chroma samples horizontally,
2: twice as many lightness samples as chroma samples horizontally,
SHORT 1: ChromaSubsampleVert = 1, 2.
1: equal numbers of lightness and chroma samples vertically,
2: twice as many lightness samples as chroma samples vertically,
The default value for ChromaSubSampling is (2,2), which is the
default for chroma subsampling in color fax [T.4, Annex E]. No
chroma subsampling, i.e. ChromaSubSampling = (1,1), is an option
for color fax
ChromaPositioning(531) = 1. SHORT
Specifies the spatial positioning of chroma components relative to
the lightness component.
1: centered,
A value of 1 means chrominance samples are spatially offset and
centered with respect to luminance samples. See the current TIFF
specification under YcbCr positioning for further information.
Default = 1, which is what ITU-T T.4, Annex E specifies.
6.2.3. New Fields
Decode(433). SRATIONAL
Count = 2 * SamplesPerPixel
Describes how to map image sample values into the range of values
appropriate for the current color space. In general, the values are
taken in pairs and specify the minimum and maximum output value for
each color component. For the base color fax mode, Decode has a
count of 6 values and maps the unsigned ITULAB-encoded sample values
(Lsample, asample, bsample) to signed L*a*b* values, as follows:.
L* = Decode[0] + Lsample x (Decode[1]-Decode[0])/(2^n -1)
a* = Decode[2] + asample x (Decode[3]-Decode[2])/(2^n -1)
b* = Decode[4] + bsample x (Decode[5]-Decode[4])/(2^n -1)
where Decode[0], Decode[2] and Decode[4] are the minimum values for
L*, a* and b*; Decode[1], Decode[3] and Decode[5] are the maximum
values for L*, a* and b*; and n is the BitsPerSample, either 8 or
12. For example, when n=8, L*=Decode[0] when Lsample=0 and
L*=Decode[1] when Lsample=255.
ITU-T Rec. T.42 specifies the ITULAB encoding in terms of a range
and offset for each component, which are related to the minimum and
maximum values as follows:
minimum = - (range x offset) / 2^n - 1
maximum = minimum + range
The Decode field default values depend on the color space. For the
ITULAB color space encoding, the default values correspond to the
base range and offset, as specified in ITU-T Rec. T.42 [T.42]. The
following table gives the base range and offset values for
BitsPerSample=8 and 12, and the corresponding default minimum and
maximum default values for the Decode field, calculated using the
equations above when PhotometricInterpetation=10.
+-----------------------------------------------+
| ITU-T Rec. T.42 | Decode |
+---------+-----------| base values | default values |
| BitsPer + Component +------------------+----------------------------+
| -Sample | | Range | Offset | Min | Max |
+---------+-----------+--------+---------+--------------+-------------+
| 8 | L* | 100 | 0 | 0 | 100 |
| +-----------+--------+---------+--------------+-------------+
| | a* | 170 | 128 | -21760/255 | 21590/255 |
| +-----------+--------+---------+--------------+-------------+
| | b* | 200 | 96 | -19200/255 | 31800/255 |
+---------+-----------+--------+---------+--------------+-------------+
| 12 | L* | 100 | 0 | 0 | 100 |
| +-----------+--------+---------+--------------+-------------+
| | a* | 170 | 2048 | -348160/4095 | 347990/4095 |
| +-----------+--------+---------+--------------+-------------+
| | b* | 200 | 1536 | -307200/4095 | 511800/4095 |
+---------+-----------+--------+---------+--------------+-------------+
For example, when PhotometricInterpretation=10 and BitsPerSample=8,
the default value for Decode is (0, 100, -21760/255, 21590/255,
-19200/255, 31800/255).
6.3. Recommended TIFF Fields
See Sections 2.2.3. and 2.2.4.
6.4 Base Color Fax Mode Summary
Recommended fields are shown with an asterisk *
Required fields or values are shown with a double asterisk **. If the
double asterisk is on the field name, then all the listed values are
required of implementations; if the double asterisks are in the
Values column, then only the values suffixed with a double asterisk
are required of implementations.
+---------------------------+--------------------------------+
| Baseline Fields | Values |
+---------------------------+--------------------------------+
| BitsPerSample | 8**: 8 bits per color sample |
| | 12: optional 12 bits/sample |
+---------------------------+--------------------------------+
| Compression** | 7: JPEG |
+---------------------------+--------------------------------+
| DateTime* | {ASCII}: date/time in 24-hour |
| | format "YYYY:MM:DD HH:MM:SS" |
+---------------------------+--------------------------------+
+------------------------------------------------------------+
| FillOrder** | 1: most significant bit first |
| | 2: least significant bit first |
+---------------------------+--------------------------------+
| ImageDescription* | {ASCII}: A string describing |
| | the contents of the image. |
+---------------------------+--------------------------------+
| ImageWidth | 864, 1024, 1216, 1728**, 2048 |
| | 2432, 2592, 3072, 3456, 3648 |
| | 4096, 4864 |
+---------------------------+--------------------------------+
| ImageLength** | n: total number of scanlines |
| | in image |
+---------------------------+--------------------------------+
| NewSubFileType** | 2: Bit 1 identifies single page|
| | of a multi-page document |
+---------------------------+--------------------------------+
| Orientation | 1**-8, Default 1 |
+---------------------------+--------------------------------+
| PhotometricInterpretation | 10**: ITULAB |
+---------------------------+--------------------------------+
| ResolutionUnit** | 2: inch |
| | 3: centimeter |
+---------------------------+--------------------------------+
| RowsPerStrip** | n: number of scanlines per |
| | TIFF strip |
+---------------------------+--------------------------------+
| SamplesPerPixel | 1**: L* (lightness) |
| | 3: LAB |
+---------------------------+--------------------------------+
| Software* | {ASCII}: name & release number |
| | of creator software |
+---------------------------+--------------------------------+
| StripByteCounts** | <n>: number or bytes in |
| | TIFF strip |
+---------------------------+--------------------------------+
| StripOffsets** | <n>: offset from beginning |
| | of file to each TIFF strip |
+---------------------------+--------------------------------+
| XResolution | 100, 200**, 300, 400 (written |
| | in pixels/inch) |
+---------------------------+--------------------------------+
| YResolution | 100, 200**, 300, 400 |
| | (must equal XResolution) |
+---------------------------+--------------------------------+
+---------------------------+--------------------------------+
| Extension Fields |
+---------------------------+--------------------------------+
| DocumentName* | {ASCII}: name of scanned |
| | document |
+---------------------------+--------------------------------+
| PageNumber** | n,m: page number followed by |
| | total page count |
+---------------------------+--------------------------------+
| ChromaSubSampling | (1,1), (2, 2)** |
| | (1, 1): equal numbers of |
| | lightness and chroma samples |
| | horizontally and vertically |
| | (2, 2): twice as many lightness|
| | samples as chroma samples |
| | horizontally and vertically |
+---------------------------+--------------------------------+
| ChromaPositioning | 1**: centered |
+---------------------------+--------------------------------+
| New Fields |
+---------------------------+--------------------------------+
| Decode** | minL, maxL, mina, maxa, minb, |
| | maxb: minimum and maximum |
| | values for L*a*b* |
+---------------------------+--------------------------------+
| GlobalParametersIFD* | IFD: IFD containing |
| | global parameters |
+---------------------------+--------------------------------+
| ProfileType* | n: type of data stored in |
| | TIFF file |
+---------------------------+--------------------------------+
| FaxProfile* | n: ITU-compatible fax mode |
+---------------------------+--------------------------------+
| CodingMethods* | n: compression algorithms |
| | used in file |
+---------------------------+--------------------------------+
| VersionYear* | byte sequence: year of ITU std |
+---------------------------+--------------------------------+
7. Lossless Color Mode
This section defines the lossless color mode or Profile L of TIFF for
facsimile. Implementations of this profile are required to also
implement Profiles S and C.
7.1. Overview
This mode, defined in [T.43], uses JBIG to losslessly code three
types of color and grayscale images: one bit per color CMY, CMYK and
RGB images; a palettized (i.e. mapped) color image; and continuous
tone color and grayscale images. The last two are multi-level and use
the L*a*b* encoding specified in [T.42].
7.1.1. Color Encoding
While under development, this mode was called T.Palette, as one of
its major additions was palette or mapped color images. Baseline TIFF
only allows RGB color maps, but ITU-T Rec. T.43 requires L*a*b* color
maps, using the encoding specified in ITU-T Rec. T.42. Palette color
images are expressed with indices (bits per sample) of 12 bits or
less, or optionally 13 to 16 bits, per [T.43].
Enabling T.43 color maps in TIFF requires the extension field
Indexed, defined in [TTN1], and the PhotometricInterpretation field
value 10, defined in Section 6.2.1. The following table shows the
corresponding PhotometricInterpretation, SamplesPerPixel,
BitsPerSample and Indexed field values for the different T.43 image
types.
+----------------------------------------------------------+
| Image Type |PhotometricIn| Samples | Bits Per | Indexed |
| |-terpretation| PerPixel | Sample | |
|------------+-------------+----------+----------+---------|
| RGB | 2=RGB | 3 | 1 | 0 |
+----------------------------------------------------------+
| CMY | 5=CMYK | 3 | 1 | 0 |
+------------+-------------+----------+----------+---------+
| CMYK | 5=CMYK | 4 | 1 | 0 |
+------------+-------------+----------+----------+---------+
| Palette | 10=ITULAB | 1 | n | 1 |
+------------+-------------+----------+----------+---------+
| Grayscale | 10=ITULAB | 1 | 8, 12 | 0 |
+------------+-------------+----------+----------+---------+
| Color | 10=ITULAB | 3 | 8, 12 | 0 |
+------------+-------------+----------+----------+---------+
7.1.2. JBIG Encoding
T.43 uses the single-progression sequential mode of JBIG, defined in
ITU-T Rec. T.82. To code multi-level images using JBIG, which is a
bi-level compression method, an image is resolved into a set of bit-
planes, and each bit-plane is then JBIG compressed. For continuous
tone color and grayscale images, Gray code conversion is used. The
Gray code conversion is part of the data stream encoding, and is
therefore invisible to TIFF.
7.2. Required TIFF Fields
This section lists the required fields, in addition to those in
Section 2.2.1, and the values they must have to be compatible with
ITU-T Rec. T.43.
7.2.1. Baseline Fields
ImageWidth(256). SHORT or LONG
Same page widths as the base color mode; see Section 6.2.1.
NewSubFileType(254) = (Bit 1=1). LONG
RequiredByTIFFforFAX
Bit 1 is 1 if the image is a single page of a multi-page document.
Default = 0 (no subfile bits on, so may not be omitted for fax)
BitsPerSample(258) = 1, 2-8, 9-16. SHORT
Count = SamplesPerPixel
RGB, CMY, CMYK: 1 bit per sample
Continuous tone (L*a*b*): 2-8 bits per sample, 9-12 bits optional
Palette color: 12 or fewer bits per sample, 13-16 bits optional
Note: More than 8 bits per sample is not baseline TIFF.
ColorMap(320). SHORT
Count = 3 * number of sample values
Lossless color fax mode supports palette-color (indexed) images
where the single component value is used as an index into a full
color lookup table stored in the ColorMap field. The sample value is
encoded using the number of bits given by the BitsPerSample field
value. However, per [T.43],the number of sample values may be less
than 2**BitsPerSample. The color lookup table is only required to
have as many entries as there are number of sample values. For
palette-color images in lossless color fax mode, the ITULAB encoding
with 8 or optionally 12 bits per color map value is supported. To
utilize a color map, the TIFF Indexed field must be present. TIFF
orders the color map values so that all the L* values come first,
followed by all the a* values and then all the b* values. Because
ITU-T Rec. T.43 specifies a "chunky" ordering with the L*a*b*
components of the first value, followed by those of the second
value, and so on, reproducing color map values from a fax data
stream in a TIFF file requires reordering values.
Compression(259) = 10. SHORT
10: ITU-T Rec. T.43 representation, using ITU-T Rec. T.82 (JBIG)
coding
FillOrder(266) = 1 , 2. SHORT
RequiredByTIFFBaseline
Profile F readers must be able to read data in both bit orders,
but the vast majority of facsimile products store data LSB
first, exactly as it appears on the telephone line.
1 = Most Significant Bit first.
2 = Least Significant Bit first
PhotometricInterpretation(262) = 2, 5, 10. SHORT
2: RGB
5: CMYK, including CMY
10: ITULAB
Image data may also be stored as palette color images, where pixel
values are represented by a single component that is an index into a
color map using the ITULAB encoding. This color map is specified by
the ColorMap field. To use palette color images, set the
PhotometricInterpretation to 10,SamplesPerPixel to 1, and Indexed to
1. The color map is stored in the ColorMap field. See Section 7.1.1
for further discussion on the color encoding.
ResolutionUnit(296) = 2, 3. SHORT
The unit of measure for resolution. 2 = inch, 3 = centimeter;
Default = 2 (field may be omitted if this is the value)
SamplesPerPixel(277) = 1, 3, 4. SHORT
1: Palette color image, or L*-only if Indexed = 0 and
PhotometricInterpretation is 10 (ITULAB).
3: RGB, or L*a*b*, or CMY if PhotometricInterpretation is 5 (CMYK).
4: CMYK.
XResolution(282) = 100, 200, 300, 400. RATIONAL
YResolution(283) = 100, 200, 300, 400. RATIONAL
The resolution of the image is expressed in pixels per resolution
unit. In pixels per inch, allowed XResolution values are: 100, 200,
300, and 400. The lossless color fax mode requires the pixels to be
square, hence YResolution must equal XResolution. Base resolution is
200 pixels per inch. See Section 2.2.2 for inch-metric equivalency.
7.2.2. Extension Fields
Indexed(364) = 0, 1. SHORT
0: not a palette-color image
1: palette-color image
This field is used to indicate that each sample value is an index
into an array of color values specified in the ColorMap field.
Lossless color fax mode supports palette-color images with the
ITULAB encoding. The SamplesPerPixel value must be 1.
7.2.3. New Fields
Decode(433) SRATIONAL
Decode is used in connection with the ITULAB encoding of image data
and color map values; see Section 6.2.3.
7.3. Recommended TIFF Fields
See Sections 2.2.3. and 2.2.4.
7.4. Lossless Color Fax Mode Summary
Recommended fields are shown with an asterisk *.
+--------------------+--------------------------------------+
| Baseline Fields | Values |
+--------------------+--------------------------------------+
| BitsPerSample | 1: Binary RGB, CMY(K) |
| | 8: 8 bits per color sample |
| | 9-16: optional |
+--------------------+--------------------------------------+
| ColorMap | n: LAB color map |
+--------------------+--------------------------------------+
| Compression | 10: JBIG, per T.43 |
+--------------------+--------------------------------------+
| DateTime* | {ASCII}: date/time in the 24-hour |
| | format "YYYY:MM:DD HH:MM:SS" |
+--------------------+--------------------------------------+
| FillOrder** | 1: Most significant bit first |
| | 2: Least significant bit first |
+--------------------+--------------------------------------+
| ImageDescription* | {ASCII}: A string describing the |
| | contents of the image. |
+--------------------+--------------------------------------+
| ImageWidth | 864, 1024, 1216, 1728**, 2048, 2432, |
| | 2592, 3072, 3456, 3648, 4096, 4864 |
+--------------------+--------------------------------------+
| ImageLength** | n: total number of scanlines in image|
+--------------------+--------------------------------------+
| NewSubFileType | 2: Bit 1 identifies single page of a |
| | multi-page document |
+--------------------+--------------------------------------+
| Orientation | 1**-8, Default 1 |
+--------------------+--------------------------------------+
| PhotometricInter- | 2: RGB |
| pretation | 5: CMYK |
| | 10: ITULAB |
+--------------------+--------------------------------------+
+--------------------+--------------------------------------+
| ResolutionUnit | 2: inch |
| | 3: centimeter |
+--------------------+--------------------------------------+
| RowsPerStrip | n: number of scanlines per TIFF strip|
+--------------------+--------------------------------------+
| SamplesPerPixel | 1: L* (lightness) |
| | 3: LAB, RGB, CMY |
| | 4: CMYK |
+--------------------+--------------------------------------+
| Software* | {ASCII}: name & release number of |
| | creator software |
+--------------------+--------------------------------------+
| StripByteCounts | <n>: number or bytes in TIFF strip |
+--------------------+--------------------------------------+
| StripOffsets | <n>: offset from beginning of file to|
| | each TIFF strip |
+--------------------+--------------------------------------+
| XResolution | 100, 200, 300, 400 (written in |
| | pixels/inch) |
+--------------------+--------------------------------------+
| YResolution | equal to XResolution (pixels must be |
| | square) |
+--------------------+--------------------------------------+
| Extension Fields |
+--------------------+--------------------------------------+
| DocumentName* | {ASCII}: name of scanned document |
+--------------------+--------------------------------------+
| PageNumber | n,m: page number followed by total |
| | page count |
+--------------------+--------------------------------------+
| Indexed | 0: not a palette-color image |
| | 1: palette-color image |
+--------------------+--------------------------------------+
| New Fields |
+--------------------+--------------------------------------|
| Decode | minL, maxL, mina, maxa, minb, maxb: |
| |minimum and maximum values for L*a*b* |
+--------------------+--------------------------------------+
| GlobalParameters | IFD: global parameters IFD |
| IFD* | |
+-----------------------------------------------------------+
+--------------------+--------------------------------------+
| ProfileType* | n: type of data stored in TIFF file |
+--------------------+--------------------------------------+
| FaxProfile* | n: ITU-compatible fax mode |
+--------------------+--------------------------------------+
| CodingMethods* | n:compression algorithms used in |
| | file |
+--------------------+--------------------------------------+
| VersionYear* | byte sequence: year of ITU fax std |
+--------------------+--------------------------------------+
8. Mixed Raster Content Mode
This section defines the Mixed Raster Content mode or Profile M of
TIFF for facsimile. Implementations of this profile are required to
implement Profiles S and C, and may optionally implement Profiles F,
J and L.
8.1. Overview
Unlike previous fax modes, which use a single coding method and
spatial resolution for an entire fax page, the Mixed Raster Content
mode [T.44] enables different coding methods and resolutions within a
single page. For example, consider a page that contains black-and-
white text, which is best coded with MMR or JBIG, a color bar chart,
best coded with JBIG, and a scanned color image, best coded with
JPEG. Similarly, while spatial resolution of 400 pixels per inch may
be best for the black-and- white text, 200 pixel per inch is usually
sufficient for a color image.
Rather than applying one coding method and resolution to all
elements, MRC allows multiple coders and resolutions within a page.
By itself, MRC does not define any new coding methods or resolutions.
Instead it defines a 3-layer image model for structuring and
combining the scanned image data. The MRC 3-layer model has been
applied here using the TIFF format to yield a data structure which
differs from [T.44] though it applies the same coding methods, uses
the same compressed image data stream and is consistent with the TIFF
principle of a single IFD per image.
8.1.1. MRC 3-layer model
The 3 layers of the MRC model are Foreground and Background, which
are both multi-level, and Mask, which is bi-level. Each layer may
appear only once on a page and is coded independently of the other
two. In our earlier example, the black-and-white text could be in the
Mask layer, the color chart in the Foreground layer, and the color
image in the Background layer.
Each layer is an image and, when present, is represented by at least
one IFD in a TIFF file. This is consistent with TIFF, which provides
fields to define the attributes, such as resolution, image size, bits
per sample, etc., of a single image or layer. The distribution of
content among layers is determined by the writer, as is the choice of
coding method, color encoding and spatial resolution for a layer.
The final image is obtained by using the Mask layer to select pixels
from the other two layers. When the Mask layer pixel value is 1, the
corresponding pixel from the Foreground layer is selected; when it is
0, the corresponding pixel from the Background layer is selected.
Details are given in the Introduction of [T.44].
Not all pages, and not all parts of a page, require 3 layers. If
there is only one layer present, then that layer is the primary image
or IFD. If there is more than one layer, then the Mask must be one of
the layers, in which case it is the primary image and it must be page
size.
MRC allows a page to be split into strips, with a variable number of
scanlines in a strip. A strip can have 1, 2 or 3 layers. A single,
stripped layer may be stored as a single, stripped image in an IFD,
e.g., all strips associated with the Background layer may be treated
as a single image. Alternatively, each strip associated with a layer
may be stored as a separate image or IFD, e.g., the Background layer
can be composed of several images that are offset vertically with
respect to the page. In this case, there can be no overlap between
images associated with a single layer. According to [T.4] Annex G,
strips having more than 1 layer SHOULD NOT be more than 256 lines in
length unless the capability to receive longer strips has been
negotiated.
Furthermore, color fax also requires the spatial resolutions of
Background and Foreground images to be legal fax values that are also
integer factors of the Mask image resolution. For example, if the
Mask Layer resolution is 400 pixels per inch, then allowed
resolutions for the Foreground and Background layers are 100, 200 or
400 pixels per inch; if the Mask is at 300 pixels per inch, then
allowed values are 100 and 300. The Foreground and Background layer
resolutions can be independently set.
8.1.2. A TIFF Representation for the MRC 3-layer model
In the TIFF representation of the 3-layer MRC model, each page is
represented by a single IFD, called the Primary IFD, that represents
the Mask layer (unless the Foreground or Background is the single
layer present), and a set of child IFDs that are referenced through
the SubIFDs extension field [TTN1]. To distinguish MRC-specific
SubIFDs from other SubIFDs, the NewSubFileType field MUST have Bit 4
ON, indicating an MRC-related IFD. A new ImageLayer field is also
introduced that consists of two values that identify the layer
(Foreground, Background, or Mask) and the order within the layer
(first, second, ... image of the layer); see Section 8.2.3.
Because MRC allows strips with variable numbers of scanlines, a
reader MUST support StripRowCounts field because a writer may use it
in place of the RowsPerStrip field in this mode. The StripRowCounts
field allows each layer, with a variable number of scanlines in each
strip, to be represented by a single IFD, when the coding parameters
are the same for all strips in the layer. The MRC standard [T.44]
allows the Foreground and Background layers to have strips with
different coding parameters. In this case, a separate IFD is required
to represent the strips which use different coding parameters; see
text in next paragraph. In all cases, the Mask layer is required to
be represented by a single IFD and a single set of coding parameters.
The use of SubIFDs to store child IFDs is described in [TTN1]. An
example is shown graphically below. The Primary IFD associated with
page 1 (PrimaryIFD 0) points to page 2 (PrimaryIFD 1) with the
nextIFD offset. The Primary IFD, corresponding to the Mask layer
(ImageLayer=[2,1]), contains a SubIFDs field that points to a list of
child IFDs. The first child IFD represents one image of the
Background layer, i.e., ImageLayer=[1,1]. This child IFD points to
the second child IFD via the nextIFD offset. This child represents
the second Background layer image, ImageLayer=[1,2]. Finally, the
second child points to the third child, which corresponds to the
single Foreground layer image, ImageLayer=[3,1]. The next IFD offset
associated with this Foreground image is 0, indicating no more child
IFDs exist. Each primary IFD has the NewSubFileType set to 18,
indicating the IFD is MRC-specific (bit 4) and that it is a single
page of a multi-page document (bit 1). Each child IFD has the
NewSubFileType set to 16, indicating the IFD is MRC-specific. The 'V'
character should be read as a down-pointing arrow.
(nextIFD)
PRIMARY IFD 0 ------------> PRIMARY IFD 1--> ...
ImageLayer = [2,1]
NewSubFileType = 18
SubIFDs
|
V
Child IFD
ImageLayer = [1,1]
NewSubFileType = 16
|
|(nextIFD)
|
V
Child IFD
ImageLayer = [1,2]
NewSubFileType = 16
|
|(nextIFD)
|
V
Child IFD
ImageLayer = [3,1]
NewSubFileType = 16
|
|(nextIFD)
V
0
In the example above, the SubIFDs field of the Primary IFD points to
the first IFD in a list of child IFDs. TIFF allows the SubIFDs field
to point to an array of IFDs, each of which can be the first of a
list of IFDs. An MRC-enabled TIFF reader must scan all available
child IFDs to locate and identify IFDs associated with MRC layers.
In the case where the Background or Foreground layers are described
with multiple IFDs, the XPosition and YPosition TIFF fields specify
the offset to the upper-left corner of the IFD with respect to the
Mask layer; see Section 8.2.2. When there is only a single layer
(Mask, Foreground, or Background), it is stored as the Primary IFD.
8.2. Required TIFF Fields
This section describes the TIFF fields required, in addition to those
in Section 2.2.1, to represent MRC mode fax images. Since MRC mode
stores fax data as a collection of images corresponding to layers or
parts of layers, the coding methods, color encodings and spatial
resolutions used by previous modes apply to MRC. Therefore, the
descriptions here will typically reference the appropriate earlier
section. Fields and values specific to MRC mode are pointed out.
8.2.1. Baseline Fields
ImageWidth(256). SHORT or LONG
Same page widths as the base color mode; see Section 6.2.1.
In the MRC mode, the width of a Foreground or Background image in
the coded data stream may be less than the page width. In this case,
the image width in the coded data steam is used to interpret the
coded data, and the value of this field is used as the page width.
NewSubFileType(254) = 16, 18. LONG
For MRC fax mode, the NewSubFileType field has two bits that are
required.
Bit 1 indicates a single page of a multi-page document and must be
set for the Primary IFD;
Bit 4 indicates MRC imaging model as described in ITU-T
Recommendation T.44 [T.44], and must be set for Primary IFDs
and all MRC-specific child IFDs.
BitsPerSample(258) = 1, 2-8, 9-16 SHORT
Compression(259) = 3, 4, 7, 9, 10. SHORT
SamplesPerPixel(277) = 1, 3, 4. SHORT
FillOrder(266) = 1 , 2. SHORT
RequiredByTIFFBaseline
Profile F readers must be able to read data in both bit orders,
but the vast majority of facsimile products store data LSB
first, exactly as it appears on the telephone line.
1 = Most Significant Bit first.
2 = Least Significant Bit first
ResolutionUnit(296) = 2, 3. SHORT
PhotometricInterpretation(262) = 0, 1, 2, 5, 10. SHORT
For Mask layer, see Sections 4.2.1 and 5.2.1.
For Foreground and Background layers, see Sections 6.2.1 and 7.2.1.
ColorMap(320). SHORT
Count = 3 * (2**BitsPerSample)
Used when Foreground or Background layer is a palette-color image;
see Section 7.2.1.
XResolution(282) = 100, 200, 300, 400. RATIONAL
YResolution(283) = 100, 200, 300, 400. RATIONAL
The resolution of the image is expressed in pixels per resolution
unit. In pixels per inch, allowed XResolution values for all layers
are: 100, 200, 300, and 400. MRC color fax mode requires the pixels
to be square, hence YResolution must equal XResolution for all
layers. The resolution of Background and Foreground layers must each
be an integer factor of the Primary image, which is the Mask layer,
when it is present; see Section 8.4.
See Section 2.2.2 for inch-metric equivalency.
8.2.2. Extension Fields
ChromaSubSampling(530). SHORT
ChromaPositioning(531). SHORT
For Foreground and Background layers, see Section 6.2.2.
Indexed(346) = 0, 1. SHORT
For Foreground and Background layers: 1 indicates a palette-color
image, see Section 7.2.2.
T4Options(292) = 0, 1, 4, 5. SHORT
T6Options(293) = 0. SHORT
For Mask layer, see Section 4.2.2.
SubIFDs(330). IFD
Count = number of child IFDs
Each value is an offset from the beginning of the TIFF file to a
child IFD [TTN1].
XPosition(286). RATIONAL
YPosition(287). RATIONAL
Specifies the horizontal and vertical offsets of the top-left of the
IFD from the top-left of the Primary IFD in page resolution units.
For example, if the Primary IFD is at 400 pixels per inch, and a
foreground layer IFD is at 200 pixels per inch and located at pixel
coordinate (345, 678) with respect to the Primary IFD, the XPosition
value is 345/400 and the YPosition value is 678/400.
Color fax does not currently allow overlap of any component images
within a single layer.
Default values for XPosition and YPosition are 0.
8.2.3. New Fields
Decode(433). SRATIONAL
For Foreground and Background layers, see Section 6.2.3.
DefaultImageColor(434). SHORT
Count = SamplesPerPixel
In areas where no image data is available, a default color is needed
to specify the color value. If the StripByteCounts value for a strip
is 0, then the color for that strip must be defined by a default
image color.
The DefaultImageColor field uses the same encoding as the image
data, and its value is therefore interpreted using the
PhotometricInterpretation, SamplesPerPixel, BitsPerSample, and
Indexed fields. If the fax data stream requires a different
encoding, then transferring the default color value between a TIFF
file and fax data stream requires a color conversion.
For the Foreground layer image, the default value for the
DefaultImageColor field is black. For other cases, including the
Background layer image, the default value is white.
StripRowCounts(559). LONG
Count = number of strips
The number of scanlines stored in a strip. MRC allows each fax strip
to store a different number of scanlines. For strips with more than
one layer there is a maximum strip size of 256 scanlines or full
page size. The 256 maximum SHOULD be used unless the capability to
receive longer strips has been negotiated. This field replaces
RowsPerStrip for IFDs with variable-sized strips. Only one of the
two fields, StripRowCounts and RowsPerStrip, may be used in an IFD.
ImageLayer (34732). SHORT or LONG.
Count = 2
Image layers are defined such that layer 1 is the Background layer,
layer 3 is the Foreground layer, and layer 2 is the Mask layer,
which selects pixels from the Background and Foreground layers. The
ImageLayer tag contains two values, describing the layer to which
the image belongs and the order in which it is imaged.
ImageLayer[0] = 1, 2, 3.
1: Image is a Background image, i.e., the image that will appear
whenever the Mask contains a value of 0. Background images
typically contain low-resolution, continuous-tone imagery.
2: Image is the Mask layer. In MRC, if the Mask layer is present, it
must be the Primary IFD and be full page in extent (no gaps.)
3: Image is a Foreground image, i.e., the image that will appear
whenever the Mask contains a value of 1. The Foreground image
generally defines the color of text or lines, but may also
contain high-resolution imagery.
ImageLayer[1]:
1: first image to be imaged in this layer,
2: second image to be imaged in this layer,
3: ...
Value describing the image order. In MRC, this may be considered
the strip number. Since MRC mode currently does not allow overlap
between images within a layer, the order value does not have any
visual effect.
In MRC fax mode, it is possible that only a single layer is
transmitted. For example, if a page contains only a single
continuous-tone photograph, then only the Background layer may be
transmitted. In this case, the Background layer will be stored as the
Primary IFD. ImageLayer[0] will be 1 indicating Background;
ImageLayer[1] will be 1 since there can be no other IFDs associated
with that layer. No Mask layer will exist.
8.3. Recommended TIFF Fields
See Sections 2.2.3. and 2.2.4.
8.4. Rules and Requirements for Images
The MRC mode defines a fundamental set of rules for images in the 3-
layer representation.
1. If more than one layer exists, then the binary Mask layer SHALL be
present and be the primary image. The Mask layer SHALL support the
encoding defined in Section 3 and MAY support the encodings
defined in Sections 4 and 5. If only one layer exists, then the
image corresponding to that layer is the primary image.
2. When the binary Mask layer is the Primary IFD, the Primary IFD
defines and extends to the entire page boundary; all attached
model images cannot extend beyond the Primary image. Resolution
differences may cause some pixels to "hang over" the page
boundary, but no new pixels should exist completely beyond the
page extent. When the Foreground or Background layer is the
Primary IFD, the Primary IFD may not be page width.
3. The Background and Foreground images SHALL support the color
encoding defined in Section 6 and MAY support the color encoding
defined in Section 7. These images MAY optionally cover only a
portion of the strip or page.
4. Each Primary IFD and each MRC-specific SubIFD must have an
ImageLayer field to specify which layer the IFD belongs to, and
the imaging order of that IFD within the layer.
5. Each Primary IFD must have a NewSubFileType field value set to 18,
indicating a single page of a multi-page document (bit 1) and MRC
mode (bit 4).
6. Each MRC-specific child IFD must have a NewSubFileType field value
set to 16, indicating MRC mode (bit 4).
7. In MRC mode, each layer is transmitted as a sequence of strips. It
is possible that each strip of each layer can be stored as a
separate IFD. In this case, the SubIFDs structure pointed to by
the Primary IFD will contain several IFDs that have an ImageLayer
field with the layer identified as either Background (layer 1) or
Foreground (layer 3). There may be no overlap in the vertical
direction between IFDs associated with a single layer, although
there may be a gap from one of these images to the next. The TIFF
XPosition and YPosition fields are used to indicate the placement
of these images with respect to the primary image.
8. When the Mask image is present, the resolution of Background and
Foreground images must each be an integer factor of the Mask
image. For example, if the Mask image is 400 pixels/inch, then the
Background or Foreground image may be at 400 pixels/inch (400/1),
200 pixels/inch (400/2) or 100 pixels/inch (400/4).
8.5. MRC Fax Mode Summary
Recommended fields are shown with an asterisk *
+------------------+-----------------------------------------+
| Baseline Fields | Values |
|------------------|-----------------------------------------|
| BitsPerSample | 1: binary mask |
| | 8: 8 bits per color sample |
| | 9-16: optional 12 bits/sample |
+------------------+-----------------------------------------+
| ColorMap | n: LAB color map |
+------------------+-----------------------------------------+
| Compression | 3: Modified Huffman and Modified Read |
| | 4: Modified Modified Read |
| | 7: JPEG |
| | 9: JBIG, per T.85 |
| | 10: JBIG, per T.43 |
+------------------+-----------------------------------------+
| DateTime* | {ASCII): date/time in the 24-hour format|
| | "YYYY:MM:DD HH:MM:SS" |
+------------------+-----------------------------------------|
| FillOrder** | 1: Most significant bit first |
| | 2: Least significant bit first |
+------------------+-----------------------------------------|
| ImageDescription*| {ASCII}: A string describing the |
| | contents of the image. |
+------------------+-----------------------------------------+
| ImageWidth | 864, 1024, 1216, 1728**, 2048, 2432, |
| | 2592, 3072, 3456, 3648, 4096, 4864 |
+------------------+-----------------------------------------+
| ImageLength** | n: total number of scanlines in image |
+------------------+-----------------------------------------+
| NewSubFileType | 16, 18: |
| | Bit 1 indicates single page of a multi- |
| | page document on Primary IFD |
| | Bit 4 indicates MRC model |
+------------------+-----------------------------------------+
+------------------+-----------------------------------------+
| Orientation | 1**-8, Default 1 |
+------------------+-----------------------------------------+
| PhotometricInter | 0: WhiteIsZero |
| pretation | 1: BlackIsZero |
| | 2: RGB |
| | 5: CMYK |
| | 10: ITULAB |
+------------------+-----------------------------------------+
| ResolutionUnit | 2: inch |
| | 3: centimeter |
+------------------+-----------------------------------------+
| RowsPerStrip | n: number or scanlines per strip |
+------------------+-----------------------------------------+
| SamplesPerPixel | 1: L* (lightness) |
| | 3: RGB, LAB, CMY |
| | 4: CMYK |
+------------------+-----------------------------------------+
| Software* | {ASCII}: name & release number of |
| | creator software |
+------------------+-----------------------------------------+
| StripByteCounts | <n>: number or bytes in each strip |
+------------------+-----------------------------------------+
| StripOffsets | <n>: offset from beginning of file to |
| | each TIFF strip |
+------------------+-----------------------------------------|
| XResolution | 100, 200, 300, 400 (written in |
| | pixels/inch) |
+------------------+-----------------------------------------|
| YResolution | equal to XResolution (pixels must be |
| | square) |
+------------------+-----------------------------------------+
| Extension Fields |
+------------------+-----------------------------------------+
| T4Options | 0: required if Compression is Modified |
| | Huffman, EOLs not byte aligned |
| | 1: required if Compression 2D Modified |
| | Read, EOLs are not byte aligned |
| | 4: required if Compression Modified |
| | Huffman, EOLs byte aligned |
| | 5: required if Compression 2D Modified |
| | Read, EOLs are byte aligned |
+------------------+-----------------------------------------+
| T6Options | 0: required if Compression is 2D |
| | Modified Modified Read |
+------------------+-----------------------------------------+
+------------------+-----------------------------------------+
| DocumentName* | {ASCII}: name of scanned document |
+------------------+-----------------------------------------+
| PageNumber | n,m: page number followed by total page |
| | count |
+------------------+-----------------------------------------+
| ChromaSubSampling| (1,1), (2, 2)** |
| | (1, 1): equal numbers of lightness and |
| | chroma samples horizontally & vertically|
| | (2, 2): twice as many lightness samples |
| | as chroma horizontally and vertically |
+------------------+-----------------------------------------+
| ChromaPositioning| 1: centered |
+------------------+-----------------------------------------+
| Indexed | 0: not a palette-color image |
| | 1: palette-color image |
+------------------+-----------------------------------------+
| SubIFDs | <IFD>: byte offset to fg/bg IFDs |
+------------------+-----------------------------------------+
| XPosition | horizontal offset in primary IFD |
| | resolution units |
+------------------+-----------------------------------------+
| YPosition | vertical offset in primary IFD |
| | resolution units |
+------------------+-----------------------------------------+
| New Fields |
+------------------+-----------------------------------------+
| Decode | minL, maxL, mina, maxa, minb, maxb: |
| | minimum and maximum values for L*a*b* |
+------------------+-----------------------------------------+
| DefaultImageColor| <n>: background color |
+------------------+-----------------------------------------+
| StripRowCounts | <n>: number of scanlines in each strip |
+------------------+-----------------------------------------+
| ImageLayer | n, m: layer number, imaging sequence |
| | (e.g., strip number) |
+------------------+-----------------------------------------+
| GlobalParameters | IFD: global parameters IFD |
| IFD* | |
+------------------+-----------------------------------------+
| ProfileType* | n: type of data stored in TIFF file |
+------------------+-----------------------------------------+
| FaxProfile* | n: ITU-compatible fax mode |
+------------------+-----------------------------------------+
| CodingMethods* | n: compression algorithms used in file |
+------------------+-----------------------------------------+
| ModeNumber* | n: version of ITU fax standard |
+------------------+-----------------------------------------+
+------------------------------------------------------------+
| VersionYear* | byte sequence: year of ITU fax standard |
+------------------+-----------------------------------------+
9. MIME content-type image/tiff
[TIFF-REG] describes the registration of the MIME content-type
image/tiff to refer to TIFF encoded image data. When transported by
MIME, the TIFF content defined by this document must be encoded
within an image/tiff content type. In addition, an optional
"application" parameter is defined for image/tiff to identify a
particular application's subset of TIFF and TIFF extensions for the
encoded image data, if it is known. Typically, this would be used to
assist the recipient in dispatching a suitable rendering package to
handle the display or processing of the image file.
9.1 Refinement of MIME content-type image/tiff for Facsimile
Applications
Since this document defines facsimile specific profiles of TIFF, it
is useful to note an appropriate application parameter for the
image/tiff MIME content-type.
The two values of the image/tiff application parameter as defined for
facsimile are shown below, separated by a comma:
faxbw, faxcolor
The "faxbw" application parameter is suitable for use by applications
that can process one or more TIFF for facsimile profiles or subsets
used for the encoding of black and white facsimile data.
The "faxcolor" application parameter is suitable for use by
applications that can process one or more TIFF for facsimile profiles
or subsets that can be used for the encoding of black and white, AND
color facsimile data.
Since this document defines several profiles of TIFF for facsimile,
the following rules should be followed when setting the application
parameter value. For TIFF image data which is encoded for the
profiles of TIFF for Facsimile that support black-and-white image
data (Profiles S, F or J), applications which use one of these
profiles or a subset should set the value of the application
parameter to "faxbw". For TIFF image data which is encoded for the
defined profiles of TIFF for Facsimile that support color image data
(Profiles C, L or M), as well as black-and-white image data,
applications which use one of these profiles or a subset should set
the value of the application parameter to "faxcolor".
An example of the use of the image/tiff MIME Content-type with the
application parameter set with the value 'faxbw' follows:
Content-type: image/tiff; application=faxbw
In this example, use of this parameter value will enable applications
to identify the content as being within a profile or subset of TIFF
for Facsimile that is suitable for encoding black and white image
data, Before attempting to process the image data.
In a similar respect, an example of the image/tiff MIME Content-type
with the application parameter setting suitable for handling a color
subset or profile of TIFF for facsimile is shown below:
Content-type: image/tiff; application=faxcolor
10. Security Considerations
This document describes a file format for Internet fax, which is a
series of profiles of TIFF for facsimile. As such, it does not create
any security issues not already identified in [TIFF-REG], in its use
of fields as defined in [TIFF]. There are also new TIFF fields
defined within this specification, but they are of a purely
descriptive nature, so that no new security risks are incurred.
Further, the encoding specified in this document does not in any way
preclude the use of any Internet security protocol to encrypt,
authenticate, or non-repudiate TIFF-encoded facsimile messages.