📄 rfc2306.txt
字号:
F purposes are 3 and 4 as shown. The default value per Baseline TIFF is 1 (Uncompressed), but this value is invalid for facsimile images. Baseline TIFF also permits use of value 2 (Modified Huffman encoding), but the data is presented in a form which does not contain EOLs. Instead, TIFF-F specifies the value 3 for encoding one-dimensional T.4 Modified Huffman or 2-dimensional Modified READ data. The detailed settings which apply for T.4 encoded data are specified using the T4Options field. TIFF-F also permits use of the value 4 for the compression field, which indicates that the data is coded using a [T.6] compression method (i.e the Modified Modified READ two-dimensional method). The detailed settings which apply for T.6 encoded data are specified using the T6Options field. Please refer to the definitions of the T4Options and T6Options fields in section 3.3, and section 3.8 for more information on the encoding of images and conventions used within TIFF-F. PhotometricInterpretation (260) = 0,1. SHORT. This field allows notation of an inverted ("negative") image: 0 = normal 1 = inverted StripOffsets (273). SHORT or LONG. For each strip, the offset of that strip. The offset is measured from the beginning of the file. If a page is expressed as one large strip, there is one such entry per page. RowsPerStrip (278). SHORT or LONG. LONG recommended. The number of scan lines per strip. When a page is expressed as one large strip, this is the same as the ImageLength field. StripByteCounts (279). LONG or SHORT. LONG recommended. For each strip, the number of bytes in that strip. If a page is expressed as one large strip, this is the total number of bytes in the page after compression. Note that the choice of LONG or SHORT depends upon the size of the strip.Parsons & Rafferty Informational [Page 7]RFC 2306 TIFF-F Profile March 1998 ResolutionUnit (296) = 2,3. SHORT. The units of measure for resolution: 2 = Inch 3 = Centimeter TIFF-F has traditionally used inch based measures. XResolution (282) = 204, 200, 300, 400, 408 (inches). RATIONAL. The horizontal resolution of the TIFF-F image expressed in pixels per resolution unit. The values of 200 and 408 have been added to the historical TIFF-F values, for consistency with [T.30]. Some existing TIFF-F implementations may also support values of 77 (cm). See section 3.8.2 for more information on inch/metric equivalencies and other implementation details. YResolution (283) = 98, 196, 100, 200, 300, 391, 400 (inches). RATIONAL. The vertical resolution of the TIFF-F image expressed in pixels per resolution unit. The values of 100, 200, and 391 have been added to the historical TIFF-F values, for consistency with [T.30]. Some existing TIFF-F implementations may also support values of 77, 38.5 (cm). See section 3.8.2 for more information on inch/metric equivalencies and other implementation details.3.3 TIFF-F Required Fields In addition to the Baseline TIFF fields, there are additional required fields for TIFF-F. A review of the additional required fields for TIFF-F follows: BitsPerSample (258) = 1. SHORT. Since TIFF-F is only used for black-and-white facsimile images, the value is 1 (the default) for all files. FillOrder (266) = 1, 2. SHORT. TIFF 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. NewSubFileType (254)= (Bit 1 = 1). LONG. This field is made up of 32 flag bits. Unused bits are expected to be 0 and bit 0 is the low order bit. Bit 0 is set to 0 for TIFF-F. Bit 1 is always set to 1 for TIFF-F, indicating a single page of a multi-page image. The same bitParsons & Rafferty Informational [Page 8]RFC 2306 TIFF-F Profile March 1998 settings are used when TIFF-F is used for a one page fax image. See sections 3.1.1 and 3.1.2 for more details on the structure of multi-page TIFF-F image files. PageNumber (297). SHORT/SHORT. This field specifies the page numbers in the fax document. The field comprises two SHORT values: the first value is the page number, the second is the total number of pages. Single-page documents therefore use 0000/0001 hex. If the second value is 0, the total number of pages in the document is not available. SamplesPerPixel (277) = 1. SHORT. The value of 1 denotes a bi-level, grayscale, or palette color image. There is also a requirement to include either the T4Options or the T6Options field in a TIFF-F IFD, depending upon the setting of the Compression field. These fields are defined in the next section on TIFF extensions.3.4 TIFF-F Extensions These are fields which are extensions beyond the required TIFF-F fields. The following fields have been defined as extensions in [TIFF]. T4Options (292) (Bit 0 = 0 or 1, Bit 1 = 0, Bit 2 = 0 or 1). LONG. This field is required if the value for the compression field has been set to 3. The values are set as shown below for TIFF- F. For TIFF-F, uncompressed data is not allowed and EOLs MAY be byte aligned (see section 3.8.3). bit 0 = 0 for 1-Dimensional, 1 for 2-Dimensional (MR) bit 1 = must be 0 (uncompressed data not allowed) bit 2 = 0 for non-byte-aligned EOLs or 1 for byte- aligned EOLs This field is made up of a set of 32 flag bits. Unused bits must be set to 0. Bit 0 is the low order bit. Please note that T4Options was known as G3Options in earlier versions of TIFF and TIFF-F. The data in a TIFF-F image encoded using one of the T.4 methods is not terminated with an RTC (see section 3.8.5). T6Options (293) = (Bit 0 = 0, Bit 1 = 0) LONG. This field is required for TIFF-F if value of the compression field has been set to 4. The value for this field is made up of a set of 32 flag bits. Setting bit 0 to 0 indicates that the data is compressed using the Modified Modified READ (MMR) two-Parsons & Rafferty Informational [Page 9]RFC 2306 TIFF-F Profile March 1998 dimensional compression method. MMR compressed Data is two- dimensional and does not use EOLs. Each MMR encoded image MUST include an "end-of-facsimile-block" (EOFB) code at the end of each coded strip (see section 3.8.6). Uncompressed data is not applicable for bi-level facsimile images, so that bit 1 must be set to 0. Unused bits must be set to 0. Bit 0 is the low-order bit. The default value is 0 (all bits 0). bit 0 = 0 for 2-Dimensional bit 1 = must be 0 (uncompressed data not allowed) In earlier versions of TIFF, this field was named Group4Options. The significance has not changed and the present definition is compatible. In addition, three new fields, defined as TIFF-F extensions, describe page quality. The information contained in these fields is usually obtained from receiving facsimile hardware (if applicable). These fields are optional. They SHOULD NOT be used in writing TIFF-F files for facsimile image data that is error corrected or otherwise guaranteed not to have coding errors. Some implementations need to understand exactly the error content of the data. For example, a CAD program might wish to verify that a file has a low error level before importing it into a high- accuracy document. Because Group 3 facsimile devices do not necessarily perform error correction on the image data, the quality of a received page must be inferred from the pixel count of decoded scan lines. A "good" scan line is defined as a line that, when decoded, contains the correct number of pixels. Conversely, a "bad" scan line is defined as a line that, when decoded, comprises an incorrect number of pixels. BadFaxLines (326). SHORT or LONG This field reports the number of scan lines with an incorrect number of pixels encountered by the facsimile during reception (but not necessarily in the file). Note: PercentBad = (BadFaxLines/ImageLength) * 100 CleanFaxData (327). SHORT N = 0 = Data contains no lines with incorrect pixel counts or regenerated lines (i.e., computer generated) 1 = Lines with an incorrect pixel count were regenerated by receiving deviceParsons & Rafferty Informational [Page 10]RFC 2306 TIFF-F Profile March 1998 2 = Lines with an incorrect pixel count are in the data and were not regenerated by receiving device (i.e. data contains bad scan lines) Many facsimile devices do not actually output bad lines. Instead, the previous good line is repeated in place of a bad line. Although this substitution, known as line regeneration, results in a visual improvement to the image, the data is nevertheless corrupted. The CleanFaxData field describes the error content of the data. That is, when the BadFaxLines and ImageLength fields indicate that the facsimile device encountered lines with an incorrect number of pixels during reception, the CleanFaxData field indicates whether these bad lines are actually still in the data or if the receiving facsimile device replaced them with regenerated lines. ConsecutiveBadFaxLines (328). LONG or SHORT. This field reports the maximum number of consecutive lines containing an incorrect number of pixels encountered by the facsimile device during reception (but not necessarily in the file). The BadFaxLines and ImageLength data indicate only the quantity of such lines. The ConsecutiveBadFaxLines field is an indicator of their distribution and may therefore be a better general indicator of perceived image quality.3.5 Recommended Fields hese are fields that MAY be used in encoding TIFF-F files, but are ptional in nature and may be ignored by many TIFF readers. These ields are called recommended consistent with historical TIFF-F ractice. BadFaxLines (326) [defined in section 3.4] CleanFaxData (327) [defined in section 3.4] ConsecutiveBadFaxLines (328) [defined in section 3.4] DateTime (306). ASCII. Date and time in the format YYYY:MM:DD HH:MM:SS, in 24-hour format. String length including NUL byte is 20 bytes. Space between DD and HH. DocumentName (269). ASCII. This is the name of the document from which the document was scanned.Parsons & Rafferty Informational [Page 11]RFC 2306 TIFF-F Profile March 1998 ImageDescription (270). ASCII. This is an ASCII string describing the contents of the image. Orientation (274). SHORT. This field is designated as "Recommended" for consistency with historical TIFF-F, but is also a Baseline TIFF field with a default value of 1 per [TIFF]. The default value of 1 applies if the field is omitted, but for clarity, TIFF-F writers SHOULD include this field. This field might be useful for displayers that always want to show the same orientation, regardless of the image. The default value of 1 is "0th row is visual top of image, and 0th column is the visual left." An 180-degree rotation is 3. See [TIFF] for an explanation of other values. Software (305). ASCII. The optional name and release number of the software package that created the image.3.6 Requirements for TIFF-F Minimum Subset This section defines the requirements for a minimum subset of TIFF-F fields and values that all TIFF-F readers SHOULD support to maximize interoperability with current and historical TIFF-F implementations. The TIFF-F structure for writing minimum subset files is also defined.3.6.1 Summary of Minimum Subset Fields and Values A summary of the minimum subset TIFF-F fields and values is provided in the following table. The required fields for the minimum subset are shown under the column labeled "Field". The values for these fields in the minimum subset are shown under the column labeled "Minimum". Field | Minimum | Comment ------------------|--------------|------------------------------- BitsPerSample | 1 |one bit per sample Compression | 3 |3 for T.4 (MH) FillOrder | 2 |LSB first ImageWidth | 1728 | ImageLength | |required NewSubFileType | Bit 1 = 1 |single page of multipage file PageNumber | X/X |pg/tot, 0 base, tot in 1st IFD PhotometricInterp | 0 |0 is white ResolutionUnit | 2 |inches (default) RowsPerStrip |=ImageLength | SamplesPerPixel | 1 |one sample per pixelParsons & Rafferty Informational [Page 12]RFC 2306 TIFF-F Profile March 1998 StripByteCounts | |required StripOffsets | |required T4Options | Bit 0 = 0 |MH | Bit 1 = 0 | | Bit 2 = 0,1 |Non-Byte-aligned, | | Byte-Aligned EOLs XResolution | 204 |Units is per inch YResolution | 196,98 |Units is per inch ------------------|--------------|------------------------------3.6.2 TIFF-F Minimum Subset File Structure For implementations which need to write minimum subset TIFF-F files, the file structure shown in Figure 3.1 MUST be used: +-----------------------+ | Header |------------+ +-----------------------+ | First IFD | IFD (page 0) | <----------+ Offset +---| |------------+ | | |--+ | Value | +-----------------------+ | | Offset +-->| Long Values | | | +-----------------------| | Strip |
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -