SaveT44 method (ILEADRasterMrc)

Visual Basic example

Visual C++ 5.0 example

 

Syntax

short SaveT44(LPDISPATCH pRaster, BSTR pszFileName, long lFormat, short iPage, short iModify);

Overview

Refer to Working with the MRC Bitmap.

Remarks

(Document/Medical only) Saves the given LEADImage bitmap in one of the standard T44 Formats: as a Standard T44 format file (if the nFormat value is FILE_MRC) or as a TIF file with a MRC subtype format (if the nFormat value is FILE_TIF_MRC). When an nFormat value of FILE_MRC is used, *.MRC is the default file extension. When an nFormat value of FILE_TIF_MRC is used, *.TIF is the default file extension. Use nModify and nPage to control page insertion and replacement operations when working with new pages in multi-page files.

The SaveT44 method maps the text and picture segments into layers (mask, background and foreground layers) as defined in the NLS* model of the T.44 standard. If segmentation has been performed, when the SaveT44 method is called any 2-bit text, 2-bit grayscale, and 8-bit grayscale segments are treated as 24-bit image segments. If a text segment contains text over a background, when it is saved using the SaveT44 method the background color is lost. For more information on Mixed Raster Content (MRC) formats, refer to Working with MRC Bitmaps.

Use the SaveT44 method to save a file if it is necessary that the file be readable by any application that supports the T44 standard.

Use the Save method to save a file in the LEAD Proprietary T44 format to:

image\sqrblit.gif Take advantage of the greater number of different segment types available when using the proprietary format.

image\sqrblit.gif Create smaller files than would be possible by saving them to the standard T44 format.

image\sqrblit.gif Create higher quality files than would be possible by saving them to the standard T44 format.

Please note that when creating a Standard T44 format file (calling the SaveT44 method using an nFormat value of FILE_MRC), only one page can be saved.

When using the SaveT44 method, segments can be any of the following types:

SEGTYPE_TEXT_1BIT_BW

SEGTYPE_TEXT_1BIT_COLOR

SEGTYPE_PICTURE

SEGTYPE_BACKGROUND

SEGTYPE_ONE_COLORED

SEGTYPE_TEXT_2BIT_BW

Set the compression for 1-bit text segments by setting the MaskCoder property. Fax G3 1D, Fax G3 2D, Fax G4 or JBIG compression can be used. Note that when using the SaveT44 method all segments that have been classified through segmentation as 2-bit text, 2-bit grayscale, or 8-bit grayscale segments will be treated as 24-bit image segments. Set the compression for pictures by setting the PictureCoder property. JPEG compression can be used. Set the quality factor for pictures by setting the PictureQFactor property.

Before saving, set the default base background color property by setting the BaseBackColor property, and the default base foreground color property by setting the BaseForeColor property.

It is best to perform segmentation before calling the SaveT44 method. Segmentation can be performed automatically by calling the AutoSegment method, or manually by calling the CreateNewSegment method. Call the StartSegmentation method before calling any of the segmentation methods. When the LEADMrc object is no longer needed, free it by calling the StopSegmentation method. For more information on segmentation, refer to General Segmentation, Auto-Segmentation, and Manual Segmentation.

Control the segmentation process by setting the following properties:

CombineFactor property

CombineFlags property

ImageType property (If using the AutoSegment method)

Sensitivity property (If using the AutoSegment method)

If segmentation has not been performed before the SaveT44 method is called, segmentation is performed internally. The StartSegmentation and AutoSegment methods are called, in that order. The image is segmented into blocks 60 pixels wide and 60 pixels high, and the function tries to combine similar segments using a CombineFactor property of 30, and an ImageType of scanned. The SaveT44 function can recognize two different segment types: 1-bit text and picture. The compression for 1-bit schemes can be Fax G3 1D, Fax G3 2D, Fax G4 or JBIG. Use the MaskCoder property to set the compression for the 1-bit schemes. The default is Fax G4. The compression for pictures can be JPEG, and can be set using the PictureCoder property and the PictureQFactor property. The default is JPEG compression with a PictureQFactor of 2.

*NLS (N-Layer stripe) means that each stripe may contain one or more mask layers, foreground layers, and background layers.

See Also

Elements

MaskCoder property, PictureCoder property, PictureQFactor property, Save method, Grayscale2BitCoder property, Grayscale8BitCoder property, Grayscale8BitQFactor property¸ Text2BitCoder property, AutoSegmentExt method

Topics

Raster Images: Saving a Page