Version
Chapter 5
Image Format Characteristics
5.1 Introduction
5.2 About Image Format Characteristics
5.2.1 Encoding Formats
5.2.2 Resolution Formats
5.2.3 Page Width Formats
5.3 Options for Storing and Converting Image Data
5.4 T.37 and TIFF-S
5.1 Introduction
This chapter provides additional information about the image format characteristics supported by NaturalFax. This chapter explains file storage formats and image encoding formats as specified in ITU T.4 and T.6. Use this information to choose the most effective combination of image format characteristics for your host system and your application.
5.2 About Image Format Characteristics
NaturalFax uses TIFF-F or TIFF-S image files. TIFF-F files (Tagged Image File Format for Fax) and TIFF-S files (Tagged Image File Format, profile S for T.37) use tags to specify the format of the graphics file. See
Section 5.4
for more information about using TIFF-S image formats.
This section explains the three basic image format characteristics in a TIFF-F file, and how the image format can be affected by various NaturalFax operations.
The image data in a TIFF-F or TIFF-S file has three basic characteristics:
Encoding format (always 1D for TIFF-S)
Resolution format (always LOW for TIFF-S)
Page width (always A4 for TIFF-S)
5.2.1 Encoding Formats
NaturalFax supports four
encoding
formats
:
Encoding Format
Description
NFX_ENCODE_1D
One-dimensional (MH) encoding
NFX_ENCODE_2D
Two-dimensional (MR) encoding
NFX_ENCODE_MMR
MMR (modified modified read) encoding
NFX_ENCODE_TIFF_S
Encoding used for T.37 file formats (which sets TIFF-S encoding, resolution and page width)
A fax terminal can support any of the following combinations of encoding formats:
1D only
1D and 2D
1D, 2D, and MMR
Fax terminals are backwards-compatible; a fax terminal cannot support 2D or MMR encoding without also supporting 1D encoding.
All three encoding formats produce identical images. No information is lost during a conversion to a different encoding format. The final image appears identical to the original image.
1D, 2D, and MMR provide the same image quality, but differ in the following attributes:
Data compression
, which affects how much disk space will be required for file storage, and how much transmission time is needed for image transfer
CPU resource consumption
for encoding, which affects application performance and availability of CPU resources for other needs
Impact of errors
, which includes whether a local error affects one line, or multiple lines, and whether ECM must be enabled
Compatibility with other fax terminals
, which affects the probability that an application will need to convert an image to a different encoding in order to transmit it successfully
MMR encoding consumes the smallest amount of disk space and the least transmission time. An equivalent image in 2D encoding consumes more disk space and transmission time than MMR, and 1D encoding consumes more disk space and transmission time than 2D.
Encoding and decoding an MMR image consumes more CPU resources than encoding and decoding a 2D image; 1D images consume the least CPU resources for encoding and decoding.
A local error in a 1D image affects a single line in the document. An error in a 2D image may affect several subsequent lines as well. An error in an MMR image will affect the remainder of the page. Therefore, MMR images can only be sent with Error Correction Mode (ECM) enabled. 1D and 2D images can be sent with or without ECM enabled.
Files stored in MMR format may have to be converted to another encoding format before they can be transmitted to some fax machines. Use MMR to minimize disk storage requirements when the system has plenty of available CPU resources for format conversions.
Note:
You can use MMR encoding to store fax image files and still transmit or receive faxes with ECM disabled by using on-the-fly conversion. To enable on-the-fly conversion, set
OTFmode
in
NFX_TRANMSIT_PARMS
or
NFX_RECEIVE_PARMS
to
NFX_OTF_ONLY_IF_FAIL
or
NFX_OTF_ALWAYS,
as described in
Section 3.7
.
1D encoding enables files to be transmitted directly to any fax machine without conversion. Files stored in 1D format use the "lowest common denominator" of encoding formats. Use 1D encoding to conserve CPU resources and minimize format conversion needs.
The following table summarizes the advantages and disadvantages of each image encoding format. Keep in mind that the image quality for all three encoding formats is identical.
Encoding
Storage
Space
CPU
Resources
An Error Affects...
Transmit Time
ECM Requirement
1D
Most
Least
A single line
Most
Optional
2D
More
More
Multiple lines
More
Optional
MMR
Least
Most
Remainder of page, which forces retransmission of a frame
Least
Mandatory
5.2.2 Resolution Formats
NaturalFax supports three
resolution
formats
:
Resolution Format
Description
NFX_RESOLUTION_LOW
3.85 scan lines/mm, vertically
NFX_RESOLUTION_HIGH
7.7 scan lines/mm, vertically
NFX_RESOLUTION_SUPER_HIGH
15.4 scan lines/mm, vertically
A fax terminal can support only LOW resolution, both LOW and HIGH resolution, or all three resolution values, LOW, HIGH, and SUPERHIGH. Converting an image from higher to lower resolution modifies the image data, and information is lost. The resulting image is more compact, which saves storage space and transmission time. When converting from higher to lower resolution, NaturalFax favors black pixels to prevent the loss of thin black lines.
NaturalFax can convert from lower to higher resolution by duplicating lines. However, conversion from lower to higher makes little sense since the additional redundant information does not improve image quality and requires more storage space and transmission time.
5.2.3 Page Width Formats
NaturalFax supports the following
page width
formats:
Page Width Format
Description
NFX_PAGE_WIDTH_A4
8.25 inches wide, 200 pixels/inch resolution
NFX_PAGE_WIDTH_B4
10 inches wide, 200 pixels/inch resolution
NFX_PAGE_WIDTH_A3
11.9 inches wide, 200pixels/inch resolution
A fax terminal may support only A4, both A4 and B4, or all three page width values, A4, B4, and A3. Converting an image from a wider to a narrower page modifies the image data, and information is lost. The resulting image is more compact, which saves storage space and transmission time. NaturalFax shrinks lines to fit so that the image is not cut off. Black pixels are favored for shrinkage to prevent the loss of thin black lines.
NaturalFax can convert from a narrower page width to a wider page width by appending white space.
5.3 Options for Storing and Converting Image Data
Each image stored in a TIFF-F file has a specific set of image format characteristics. TIFF-S files always store the image using 1D encoding, low resolution, and A4 page width. During image transfer, the image characteristics of the stored image may be different from the values of the image being sent or received. Image format conversion can occur on-the-fly during the fax session, or it can be initiated offline by the application. Consider these factors when you design your application, select your TIFF-F file storage characteristics, and determine your conversion settings:
Machine restrictions
Not all fax terminals can handle the full range of image characteristics. A "more capable" machine will always support the values of a "less capable" machine. At the start of a fax session, the receiver announces its capabilities (DIS frame). The sender chooses the image format for the transmission (DCS frame) within the limits of the receiver's capabilities. If the file to be sent has an image format that is beyond the capabilities of the receiver, the sender must perform on-the-fly image conversion.
File size
Some image formats consume less data storage space than others, but may require more CPU resources from the host system for encoding. You may want to use a particular format for all transactions if data storage space and transmission time (and telephone charges) are primary considerations for application design.
CPU resources
Converting between one image format and another requires host processor execution time. The execution time required for conversions will be the limiting factor if the system's CPU will be heavily loaded by database or other operations in additions to fax functions. The application may elect to accept a longer transmission time in return for conserving CPU resources. Offline conversion of an image from one format to another can be performed to help minimize the execution load.
Bad line replacement
NaturalFax performs bad line analysis by decoding a line and comparing its length in pixels to the line length appropriate to the page width in use. During image conversion, bad lines may be eliminated or replaced, as determined by the value of the
badlineaction
parameter.
Document compatibility
NaturalFax transmits files that are in TIFF-F or TIFF-S format. The TIFF-F files may have different image attributes on different pages. NaturalFax performs on-the-fly conversions to ensure that mixed image files are transmitted as a single document.
5.4 T.37 and TIFF-S
T.37 describes an end-to-end fax session, using e-mail as the transport. The
ITU-T document for a T.37 session completely describes the format and addressing conventions required to transport a fax using e-mail protocols as the transport over the internet to a G3 device. Part of that document defines TIFF-S, which is the file format used for fax over e-mail.
TIFF-S is a subset of TIFF-F (the file format most commonly used for fax).
TIFF-S has the following page characteristics across all pages:
1D encoding
LOW resolution
A4 page width
TIFF-S also specifies the physical layout of the TIFF file. No optional TIFF fields are allowed when writing TIFF tag data, to ensure that minimal black and white fax transmission occurs.
Version
Want to send us feedback on our documentation? Email:
Tech_Pubs@nmss.com
Copyright © 2000, Natural MicroSystems, Inc. All rights reserved.