data; see Section 6.2.3.
7.3. Recommended TIFF Fields
See Sections 2.2.3. and 2.2.4.
7.4. Profile L: Lossless Color Fax Profile 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 | 1: Binary RGB, CMY(K) |
| | 8**: 8 bits per color sample |
| | 9 - 12: optional |
+--------------------+--------------------------------------+
| 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 |
+--------------------+--------------------------------------+
| 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 (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 profile |
+--------------------+--------------------------------------+
| CodingMethods* | n: compression algorithms used in |
| | file |
+--------------------+--------------------------------------+
| VersionYear* | byte sequence: year of ITU fax std |
+--------------------+--------------------------------------+
8. Profile M: Mixed Raster Content Profile
This section defines the Mixed Raster Content profile of TIFF for
facsimile, designated Profile M. 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 profiles, which use a single coding method and
resolution for an entire fax page, Mixed Raster Content [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, although spatial resolution of 400 pixels per inch may be
best for the black-and-white text, 200 pixels 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 with the TIFF format to yield a data structure that
differs from [T.44], though it applies the same coding methods, uses
the same compressed image data streams, 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 layers. The final image is obtained by using the Mask layer to
determine whether output pixels come from the Foreground layer or the
Background layer. 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].
In our earlier example, the shape of the black-and-white text and the
mask for the color chart could be in the Mask layer, the color of the
chart and text in the Foreground layer, and the color image in the
Background layer. If a Mask layer pixel has a value of 1, the final
image pixel will be, depending on the pixel location, from either the
color chart or text color in the Foreground layer. If a Mask layer
pixel has a value of 0, the final image pixel will be from 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.
Not all pages, and not all parts of a page, require 3 layers. If a
page has of only one layer, then that layer is the primary image
whether it is a Background, Mask, or Foreground layer. If there is
more than one layer, then the Mask must be one of the layers, in
which case it is the primary image. In all cases, the primary image
must be page size.
MRC [T.44] allows a page to be transmitted as a series of stripes,
each consisting of 1, 2 or 3 layers. The number of scanlines in each
stripe can vary over the page. Although [T.44] does not allow
overlap between images of a single layer, the MRC profile permits
overlapping IFDs when one of the IFDs is used only to define a
default image color. According to [T.4] Annex H, stripes having more
than 1 layer SHOULD NOT be more than 256 lines in length unless the
capability to receive longer stripes 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 allowable
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
allowable values are 100 and 300. The Foreground and Background
layer resolutions can be set independently of each other.
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. The nextIFD
offset associated with a Primary IFD will point to the Primary IFD of
the next page. If the page consists of a single layer, then the
Primary IFD represents that layer. If more than one layer is
present, the Primary IFD represents the Mask layer and the other
layers are represented by a set of child IFDs that are referenced
through the SubIFD extension field [TTN1] of the Primary IFD. 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.
In Profile M, the Primary IFD represents a complete layer and
corresponds to the primary image described in Section 8.1.1. There
must be no other MRC-related IFDs or SubIFDs that contain image data
corresponding to the layer represented by the Primary IFD.
MRC [T.44] allows a page to be transmitted as a series of stripes. A
strip within an IFD in a Profile M file represents a stripe in a
[T.44] data stream. The [T.44] stripes of the Primary image are
represented by a single, multiple-strip IFD; the [T.44] stripes of
other layers are represented as multiple, single-strip IFDs.
The layer represented by the Primary IFD may consist of strips of
image data, but all the strips must be part of the single Primary
IFD. For example, if the page consisted of only the Background
layer, then all strips associated with the Background layer must be
treated as a single image. Because MRC allows stripes with variable
numbers of scanlines, a reader MUST support StripRowCounts field, as
a writer may use it in place of the RowsPerStrip field to support a
variable number of scanlines in each strip of the Primary IFD. In
accordance with [TTN2], each strip shall be independently encoded,
but coding parameters may not change between strips.
Layers other than the layer represented by the Primary IFD store each
strip as a separate IFD, allowing the coding parameters to change
from strip to strip as described by the MRC standard [T.44]. In all
cases, if the Mask layer exists, it shall 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]. When
the Mask is the primary image, the Background and Foreground layer
images are represented with child IFDs referenced by the SubIFDs
field in the Primary IFD. There are multiple ways to organize the
images of the Background and Foreground layer images: (1) the SubIFD
field of the Primary IFD is an array of pointers to all child image
IFDs, one entry per child image; (2) the SubIFD field is a single
pointer to a linked list of all child image IFDs; (3) the SubIFD
field is an array of two pointers, where the first pointer is to a
linked list of all Background layer image IFDs, and the second
pointer is to a linked list of all Foreground layer image IFDs. A
Profile M writer SHOULD structure the Background and Foreground layer
images by using (3), as shown in the example below. Furthermore, the
child IFDs representing the images of the Background and Foreground
layers SHOULD be ordered in the file in the same order as they occur
on the page. However, a Profile M reader must scan all available
child IFDs to locate and identify IFDs associated with MRC layers.
(nextIFD)
PRIMARY IFD PAGE 0 -----------------------> PRIMARY IFD PAGE 1--> ...
ImageLayer = [2,1]
NewSubFileType = 18
SubIFD[0] ---------------------- SubIFD[1]
| |
V V
Child IFD Child IFD
ImageLayer = [1,1] ImageLayer [3,1]
NewSubFileType = 16 NewSubFileType 16
| |
|(nextIFD) |(nextIFD)
V V
Child IFD Child IFD
ImageLayer = [1,2] ImageLayer [3,2]
NewSubFileType = 16 NewSubFileType 16
| |
|(nextIFD) |(nextIFD)
V V
Child IFD Child IFD
ImageLayer = [1,3] ImageLayer [3,3]
NewSubFileType = 16 NewSubFileType 16
| |
|(nextIFD) |(nextIFD)
V V
0 0
The XPosition and YPosition TIFF fields specify the offset to the
upper left corner of the IFD in resolution units, which are inches in
Profile M; see Section 8.2.2. The Primary IFD must not use XPosition
or YPosition fields.
MRC [T.44] allows the specification of a default image color that is
to be applied in the event no image data is transmitted for a given
stripe and layer. The new field ImageBaseColor is used to store
default image color specifications in Profile M, see 8.2.3. By
setting the StripByteCounts array to zero values, an IFD defining a
default color but containing no encoded image data can be specified.
ImageBaseColor can also be used in IFDs that contain encoded image
data. In that case, the fields of the IFD must accurately reflect
the encoding of the image data. If the StripByteCount entry for a
given strip is 0, then the ImageBaseColor is used for that strip. If
the encoded image data is ITU L*a*b, the ImageBaseColor is
interpreted with the encoding parameters of the image data. If the
image data is not ITU L*a*b*, the ImageBaseColor is interpreted as
8-bit ITU L*a*b*; see Section 8.2.3.
8.2. Required TIFF Fields
This section describes the TIFF fields required, in addition to those
in Section 2.2.1, to represent MRC fax images. Since MRC 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 profiles apply to Profile M. Therefore, the
descriptions here will typically reference the appropriate earlier
sections. Fields and values specific to Profile M are pointed out.
8.2.1. Baseline Fields
ImageWidth(256).
SHORT or LONG
Same page widths as Profile C, the base color profile; see Section
6.2.1. In Profile M, the width of a Foreground or Background
image in the coded data stream may be less than the page width,
unless the Background or Foreground is the primary image, in which
case the width of the coded data stream is the page width. The
ImageWidth field will always store the actual width of the coded
data.
NewSubFileType(254) = 16, 18.
LONG
For Profile M, 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 the 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-12
SHORT
SamplesPerPixel(277) = 1, 3, 4.
SHORT
Compression(259) = 1, 3, 4, 7, 9, 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 Compression=1 is
not used by previous profiles. An IFD used only to specify the
default image color for a layer and strip will not have any
encoded image data associated with it, i.e., the StripByteCounts
field will contain a 0. Since no image data exists in the IFD,
the Compression field shall be set to 1, indicating no
compression. A Compression field value of 1 is not allowed for
any other IFDs.
FillOrder(266) = 1 , 2.
SHORT
RequiredByTIFFBaseline
Profile M 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) = 0, 2, 10.
SHORT
For Mask layer, 0. For Foreground and Background layers, see
Sections 6.2.1 and 7.2.1.
ResolutionUnit(296) = 2.
SHORT
The unit of measure for resolution. 2 = inch.
ITU-T standards only specify inch-based resolutions for color fax
Default = 2 (field may be omitted if this is the value).
StripByteCounts(279)
SHORT or LONG
In Profile M, it is permissible for the StripByteCounts value for
a given strip to have a zero entry. This means there is no
encoded image data corresponding to that strip. Instead, the
current default image color should be used for the strip. The
standard default image colors are black for the Foreground layer
and White for the Background layer. The ImageBaseColor field can
be used to specify other default colors; see Section 8.2.3.
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. Color fax 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.
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