Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 3949

File Format for Internet Fax

Pages: 84
Draft Standard
Obsoletes:  2301
Part 3 of 4 – Pages 43 to 73
First   Prev   Next

Top   ToC   RFC3949 - Page 43   prevText

5. Profile J: Lossless JBIG Black-and-White Fax profile

This section defines the lossless JBIG black-and-white profile of TIFF for facsimile, designated Profile J. Implementations of this profile are required to implement Profile S as well. The previous section described the extended interchange set of TIFF fields for black-and-white fax, which provided support for the MH, MR, and MMR compression of black-and-white images. This section adds a profile with JBIG compression capability.

5.1. Overview

This section describes a black-and-white profile that uses JBIG compression. The ITU-T has approved the single-progression sequential mode of JBIG [T.82] for Group 3 facsimile. JBIG coding offers improved compression for halftoned originals. JBIG compression is used in accordance with the application rules given in ITU-T Rec. T.85 [T.85]. This profile is essentially the extended black-and-white profile with JBIG compression used instead of MH, MR, or MMR.
Top   ToC   RFC3949 - Page 44

5.2. Required TIFF Fields

This section lists the required fields and the values they must have to be ITU-compatible. Besides the fields listed in Section 2.2.1, the extended black-and-white fax profile requires the following fields.

5.2.1. Baseline fields

The TIFF fields that SHALL be used in this profile are the same as those described in Section 4.2.1 for the extended black-and-white profile, with two exceptions: the following text replaces the text in Section 4.2.1 for the Compression and FillOrder fields. Compression(259) = 9. SHORT RequiredByTIFFBaseline 9 = JBIG coding. This is a TIFF extension value. Default = 1 (and is not applicable; field must be specified). Profile J uses ITU-T T.85 profile of T.82; see T82Options field. FillOrder(266) = 1, 2. SHORT RequiredByTIFFBaseline 1 = Pixels are arranged within a byte such that pixels with lower values are stored in the higher-order bits of the byte, i.e., most significant bit first (MSB). 2 = Pixels are arranged within a byte such that pixels with lower column values are stored in the lower-order bits of the bytes, i.e., least significant bit first (LSB). Profile J readers must be able to read data in both bit orders.

5.2.2. Extension fields

Same fields as those in Section 2.2.1.

5.2.3. New fields

T82Options(435) = 0 LONG Required when Compression = 9 Individual bits are set to indicate the applicable profile of JBIG coding; all bits set to 0 indicates ITU-T T.85 profile of T.82; Other values are for further study. Default is all bits 0, and field may be omitted if this is the value. (Field may be omitted in Profile J files.)
Top   ToC   RFC3949 - Page 45
   Note: A T.82 decoder can decode a T.85-encoded image when it handles
   the NEWLE marker code as described Corrigendum 1 in [T.85].

5.3. Recommended TIFF Fields

See Sections 2.2.3 and 2.2.4.

5.4. Profile J: Lossless JBIG Black-and-white 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** | +---------------------------+--------------------------------+ | Compression | 9**: JBIG coding | +---------------------------+--------------------------------+ | 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 | 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 | 0: pixel value 1 means black | | ** | 1: pixel value 1 means white | +---------------------------+--------------------------------+
Top   ToC   RFC3949 - Page 46
+---------------------------+--------------------------------+
| ResolutionUnit**          | 2: inch                        |
|                           | 3: centimeter                  |
+---------------------------+--------------------------------+
| RowsPerStrip**            | n: number of scanlines per     |
|                           | TIFF strip                     |
+---------------------------+--------------------------------+
| SamplesPerPixel**         | 1                              |
+---------------------------+--------------------------------+
| Software*                 | {ASCII}: name & release        |
|                           | number of creator software     |
+---------------------------+--------------------------------+
| StripByteCounts**         | <n>: number of bytes in TIFF   |
|                           | strip                          |
+---------------------------+--------------------------------+
| StripOffsets**            | <n>: offset from beginning of  |
|                           | file to each TIFF strip        |
+---------------------------+--------------------------------+
| XResolution               | 200, 204**, 300, 400, 408      |
|                           | (written in pixels/inch)       |
+---------------------------+--------------------------------+
| YResolution               | 98**, 196**, 100,              |
|                           | 200, 300, 391, 400             |
|                           | (written in pixels/inch)       |
+---------------------------+--------------------------------+
| Extension Fields                                           |
+---------------------------+--------------------------------+
| DocumentName*             | {ASCII}: name of document      |
|                           |  scanned                       |
+---------------------------+--------------------------------+
| PageNumber**              | n,m: page number followed by   |
|                           | total page count               |
+---------------------------+--------------------------------+
| New Fields                                                 |
+---------------------------+--------------------------------+
| GlobalParametersIFD*      | IFD: global parameters IFD     |
+---------------------------+--------------------------------+
| T82Options**              | 0: T.85 profile of T.82        |
+---------------------------+--------------------------------+
| ProfileType*              | n: type of data stored in file |
+---------------------------+--------------------------------+
| FaxProfile*               | n: ITU-compatible fax profile  |
+---------------------------+--------------------------------+
| CodingMethods*            | n: compression algorithms used |
|                           | in file                        |
+---------------------------+--------------------------------+
Top   ToC   RFC3949 - Page 47

6. Profile C: Base Color Fax profile

6.1. Overview

This section defines the lossy color profile of TIFF for facsimile, designated Profile C. Implementations of this profile are required to also implement Profile S as well. This is the base profile for color and grayscale facsimile, which means that all applications that support color fax must support this profile. The basic approach is the lossy JPEG compression [T.4, Annex E; T.81] of L*a*b* color data [T.42]. Grayscale applications use the L* lightness component; color applications use the L*, a* and b* components. This profile uses a new PhotometricInterpretation field value to describe the L*a*b* encoding specified in [T.42]. This encoding differs in two ways from the other L*a*b* encodings used in TIFF [TIFF, TTN1]: it specifies a different default range for the a* and b* components, based on a comprehensive evaluation of existing hardcopy output, and it optionally allows selectable range for the L*, a* and b* components.

6.2. Required TIFF Fields

This section lists the required fields, in addition to those given in Section 2.2.1, and the values they must support to be compatible with ITU-T Rec. T.42 and Annex E in ITU-T Rec. T.4.

6.2.1. Baseline Fields

ImageWidth(256). SHORT or LONG This profile supports the following fixed page widths: 864, 1024, 1216, 1728, 2048, 2432, 2592, 3072, 3456, 3648, 4096, 4864. 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) = 8. SHORT Count = SamplesPerPixel The base color fax profile requires 8 bits per sample.
Top   ToC   RFC3949 - Page 48
   Compression(259) = 7.
   SHORT
      Base color fax profile uses Baseline JPEG compression.  Value 7
      represents JPEG compression as specified in [TTN2].

   FillOrder(266) = 1 , 2.
   SHORT
      RequiredByTIFFBaseline
      Profile C 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) = 10.
   SHORT
      Base color fax profile requires pixel values to be stored with the
      CIE L*a*b* encoding defined in ITU-T Rec. T.42.  This encoding is
      indicated by the PhotometricInterpretation value 10, referred to
      as ITULAB.  With this encoding, the minimum sample value is
      mapped to 0, and the maximum sample value is mapped to (2^n - 1),
      i.e., the maximum value, where n is the BitsPerSample value.  The
      conversion from unsigned ITULAB-encoded samples values to signed
      CIE L*a*b* values is determined by the Decode field; see Section
      6.2.3.

   NOTE: PhotometricInterpretation values 8 and 9 specify encodings for
   use with 8-bit-per-sample CIE L*a*b* [TIFF] and ICC L*a*b* [TTN1]
   data, but they are fixed encodings, which use different minimum and
   maximum samples than the T.42 default encoding.  As currently
   defined, they are not able to represent fax-encoded L*a*b* data.

   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).

   SamplesPerPixel(277) = 1, 3.
   SHORT
      1: L* component only, required in base color profile
      3: L*, a*, b* components
      Encoded according to PhotometricInterpretation field
Top   ToC   RFC3949 - Page 49
   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 base color fax profile requires the pixels
      to be square, hence YResolution must equal XResolution.  Base
      resolution is 200 pixels per inch and SHALL be supported by all
      implementations of this profile.

   NOTE: The functional equivalence of inch-based and metric-based
   resolutions is maintained, per Annex E.6.5 in [T.4].  See table in
   Section 2.2.2.

   NOTE: Not all combinations of XResolution, YResolution and ImageWidth
   are legal.  The following table gives the legal combinations for
   inch-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.
Top   ToC   RFC3949 - Page 50
   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, 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 profile, 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
Top   ToC   RFC3949 - Page 51
      maximum values for L*, a*, and b*; and n is the BitsPerSample.
      When n=8,=20  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 the corresponding default minimum and maximum
   default values for the Decode field, calculated using the equations
   above when PhotometricInterpetation=10.

   Refer to ITU-T Rec. T.42 [T.42] to calculate the range and offset,
   and hence the minimum and maximum values, for other BitsPerSample
   values.

                      +-----------------------------------------------+
                      | 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  |
+---------+-----------+--------+---------+--------------+-------------+

   For example, when PhotometricInterpretation=10 and BitsPerSample=8,
   the default value for Decode is (0, 100, -21760/255, 21590/255,
   -19200/255, 31800/255).  For guidelines on the use of the Decode
   field, see section 5.2.2 of [GUIDE].
Top   ToC   RFC3949 - Page 52

6.3. Recommended TIFF Fields

See Sections 2.2.3. and 2.2.4.

6.4. Profile C: Base 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 asterisk is 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 | +---------------------------+--------------------------------+ | 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 | +---------------------------+--------------------------------+
Top   ToC   RFC3949 - Page 53
   +------------------------------------------------------------+
   | PhotometricInterpretation | 10**: ITULAB                   |
   +---------------------------+--------------------------------+
   | ResolutionUnit**          | 2: inch                        |
   +---------------------------+--------------------------------+
   | 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                  |
   +------------------------------------------------------------+
Top   ToC   RFC3949 - Page 54
   +---------------------------+--------------------------------+
   | 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 profile  |
   +---------------------------+--------------------------------+
   | CodingMethods*            | n: compression algorithms      |
   |                           | used in file                   |
   +---------------------------+--------------------------------+
   | VersionYear*              | byte sequence: year of ITU std |
   +---------------------------+--------------------------------+

7. Profile L: Lossless Color Profile

This section defines the lossless color profile of TIFF for facsimile, designated Profile L. Implementations of this profile are required to also implement Profiles S and C as well.

7.1. Overview

This profile, specified in [T.43] and [T.4] Annex G, uses JBIG to code three types of color and grayscale images losslessly: 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, ITU-T Rec. T.43 was called T.Palette, as one of its major additions was palettized 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] and Annex G in [T.4]. Profile L files use the color table in the T.43 data stream rather than the TIFF ColorMap field.
Top   ToC   RFC3949 - Page 55
   Enabling T.43 color maps in TIFF requires the extension field
   Indexed, as defined in [TTN1], and the PhotometricInterpretation
   field value 10, as 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| Per Pixel|  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    |2-8, 9-12 |    0    |
   +------------+-------------+----------+----------+---------+
   |    Color   |  10=ITULAB  |     3    |2-8, 9-12 |    0    |
   +------------+-------------+----------+----------+---------+

7.1.2. JBIG Compression

T.43 uses the single-progression sequential mode of JBIG, defined in ITU-T Rec. T.82. (Other compression methods are for further study.) 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.
Top   ToC   RFC3949 - Page 56

7.2.1. Baseline Fields

ImageWidth(256). SHORT or LONG Same page widths as the base color profile; 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 - 12. 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. Note: More than 8 bits per sample is not baseline TIFF. 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 L 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 color palette table embedded in the image data stream. To use palette-color images, set the PhotometricInterpretation to 10, SamplesPerPixel to 1, Indexed to 1, and use the color map in the data stream. See Section 7.1.1 for discussion of the color encoding.
Top   ToC   RFC3949 - Page 57
   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).

   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 profile requires the
      pixels to be square, hence YResolution must equal XResolution.
      Base resolution is 200 pixels per inch.

7.2.2. Extension Fields

Indexed(346) = 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 image data stream. Because the color map is embedded in the image data stream, the ColorMap field is not used in Profile L. Lossless color fax profile 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; see Section 6.2.3.

7.3. Recommended TIFF Fields

See Sections 2.2.3. and 2.2.4.
Top   ToC   RFC3949 - Page 58

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 | +--------------------+--------------------------------------+
Top   ToC   RFC3949 - Page 59
   +--------------------+--------------------------------------+
   | 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*               |                                      |
   +-----------------------------------------------------------+
Top   ToC   RFC3949 - Page 60
   +--------------------+--------------------------------------+
   | 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
Top   ToC   RFC3949 - Page 61
   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.
Top   ToC   RFC3949 - Page 62

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
Top   ToC   RFC3949 - Page 63
   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.
Top   ToC   RFC3949 - Page 64
   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.
Top   ToC   RFC3949 - Page 65
   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.
Top   ToC   RFC3949 - Page 66
   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 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 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 in inches.
Top   ToC   RFC3949 - Page 67
      The Primary IFD does not use the XPosition or YPosition fields.
      The XPosition and YPosition values must be specified for MRC child
      IFDs; there is no default value.

8.2.3. New Fields

Decode(433). SRATIONAL For Foreground and Background layers, see Section 6.2.3. T82Options(435) LONG For Mask layer, see Section 5.2.3. ImageBaseColor(434). SHORT Count = SamplesPerPixel In areas of an image layer where no image data is available (i.e., where no strips are defined, or where the StripByteCounts entry for a given strip is 0), the color specified by ImageBaseColor will be used. If the ImageBaseColor field is used in an IFD that contains image data encoded in ITU L*a*b*, then the ImageBaseColor will be interpreted with the color-encoding parameters of the image data (i.e., color gamut, illuminant, bit/sample, and decode). If the ImageBaseColor field is used in an IFD that contains image data that is not encoded in ITU L*a*b, then the ImageBaseColor SHALL be interpreted as 8 bits/sample, 3 samples/pixel ITU L*a*b*. If the ImageBaseColor field is used in an IFD that contains no encoded image data, then the ImageBaseColor SHALL be interpreted as 8 bits/sample, 3 samples/pixel ITU L*a*b*. 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. A [T.44] stripe may contain a Foreground or Background image less than full stripe size, with the rest of the stripe assuming a default image color. In this case, the default image color is imaged first, followed by the image data. In Profile M, this is represented as a child IFD containing no encoded image data but specifying the default image color in the ImageBaseColor field. A second child IFD contains the image data. To ensure the default image color is imaged first, the order value in the ImageLayer field of the IFD defining the ImageBaseColor field MUST have a lower value than the order value in the ImageLayer field of the IFD defining the image data.
Top   ToC   RFC3949 - Page 68
   To define a child IFD specifying a ImageBaseColor but containing no
   encoded image data, create an IFD with the following settings.

      ImageLayer[0]:             specified layer
      ImageLayer[1]:             less than any other IFDs corresponding
                                 to the same layer and strip.
      RowsPerStrip:              strip height
      ImageLength:               strip height
      ImageWidth:                full image width
      BitsPerSample:             8
      PhotometricInterpretation: 10 (ITULAB)
      SamplesPerPixel:           3
      Compression:               1 (none)
      X/YResolution:             that of the Primary IFD
      XPosition:                 0
      YPosition:                 the offset from the top of the page to
                                 the beginning of the strip in the
                                 resolution units of inches
      StripByteCounts:           single 0 value
      StripOffsets:              single 0 entry
      NewSubFileType:            bit 4 O     (MRC)
      ImageBaseColor:            desired color in 8 bit ITULAB

   For the Foreground layer image, the default value for the
   ImageBaseColor 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.  Profile M allows each
      fax strip to store a different number of scanlines.  For strips
      with more than one layer, the maximum strip size is either 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-size strips.  Only one of the two fields, StripRowCounts
      and RowsPerStrip, may be used in an IFD.

   ImageLayer (34732).
   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, which describe
      the layer to which the image belongs and the order in which it is
      imaged.
Top   ToC   RFC3949 - Page 69
      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.
      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: ...

      In Profile M, more than one image can exist in a single layer.
      ImageLayer[1] specifies the order in which images within a single
      layer are to be imaged.  This insures that overlapping images
      within a single layer are imaged correctly.

      If an IFD contains no encoded image data and is used only to
      specify the ImageBaseColor field, the value of ImageLayer[1] must
      be less than that of any other IFD corresponding to the same layer
      and strip to ensure the image data is interpreted as on top of the
      default color.

      In Profile M, it is possible to have only a single layer.  For
      example, if a page contains only a single continuous-tone
      photograph, then only the Background layer would occur.  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, as 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

Profile M defines a fundamental set of rules for images in the 3 layer representation.
Top   ToC   RFC3949 - Page 70
   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 binary data representations defined in Section 3 and MAY
      support those defined in Sections 4 and 5, with the exception that
      PhotometricInterpretation MUST be 0.  If only one layer exists,
      then the image corresponding to that layer is the primary image.

   2. 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.

   3. The Background and Foreground images SHALL support the color
      representations defined in Section 6 and MAY support those 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
      (bit 4).

   6. Each MRC-specific child IFD must have a NewSubFileType field value
      set to 16, indicating MRC (bit 4).

   7. In MRC fax, each layer is transmitted as a sequence of strips.  If
      the page consists of a single layer, then all strips shall be
      stored in the single Primary IFD.  In this case, coding parameters
      cannot change between strips.  If the page consists of more than
      one layer, then all strips of the Mask layer shall be stored in
      the single Primary IFD.  All strips of the Foreground/Background
      layers SHALL be stored in separate IFDs, referenced by the Primary
      IFD's SubIFD field, containing an ImageLayer field with
      ImageLayer[0] identifying either Background (layer 1) or
      Foreground (layer 3), and Imagelayer[1] identifying order in which
      images within a single layer are to be imaged.  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).
Top   ToC   RFC3949 - Page 71

8.5. Profile M: MRC 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 asterisk is in the Values column, then only the values suffixed with a double asterisk are required of implementations. +------------------+-----------------------------------------+ | Baseline Fields | Values | +------------------+-----------------------------------------+ | BitsPerSample | 1**: binary mask, RGB, CMY(K) | | | 2 - 8**: bits per color sample | | | 9 - 12: optional 12 bits/sample | +------------------+-----------------------------------------+ | Compression | 1: None (ImageBaseColor IFD only) | | | 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 | | | Note: legal widths for the Primary IFD. | +------------------+-----------------------------------------+ | 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 | +------------------+-----------------------------------------+
Top   ToC   RFC3949 - Page 72
   +------------------+-----------------------------------------+
   | Orientation      | 1**-8, Default 1                        |
   +------------------+-----------------------------------------+
   | PhotometricInter | 0**:  WhiteIsZero  (Mask Layer)         |
   | pretation        | 2:  RGB                                 |
   |                  | 10**: ITULAB                            |
   +------------------+-----------------------------------------+
   | ResolutionUnit** | 2: inch                                 |
   +------------------+-----------------------------------------+
   | 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                                   |
   +------------------+-----------------------------------------+
Top   ToC   RFC3949 - Page 73
   +------------------+-----------------------------------------+
   | 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*   |
   +------------------+-----------------------------------------+
   | ImageBaseColor   | a,b,c: background color in ITULAB       |
   +------------------+-----------------------------------------+
   | StripRowCounts   | <n>: number of scanlines in each strip  |
   +------------------+-----------------------------------------+
   | ImageLayer       | n, m: layer number, imaging sequence    |
   |                  | (e.g., strip number)                    |
   +------------------+-----------------------------------------+
   | T82Options       | 0: T.85 profile of T.82 coding          |
   +------------------+-----------------------------------------+
   | 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  |
   +------------------+-----------------------------------------+
   | ModeNumber*      | n: version of T.44 standard             |
   +------------------+-----------------------------------------+
   | VersionYear*     | byte sequence: year of ITU fax standard |
   +------------------+-----------------------------------------+