Save method (ILEADRasterMrc)
short Save(LPDISPATCH pRaster, BSTR pszFileName, long lFormat, short iPage, short iModify); | |
Overview |
Refer to Working with the MRC Bitmap. |
Remarks
(Document/Medical only)
Saves the bitmap in one of the LEAD Proprietary T44 formats: either as a LEAD proprietary T44 format file (if the lFormat value is FILE_LEAD_MRC) or as a TIF file with a LEAD MRC subtype format (if the lFormat value is FILE_TIF_LEAD_MRC). When an lFormat value of FILE_LEAD_MRC is used, *.MRC is the default file extension. When an lFormat value of FILE_TIF_LEAD_MRC is used, *.TIF is the default file extension.
The Save method will map the text, grayscale and picture segments found using automatic or manual segmentation into layers (mask, background and foreground layer) as defined in the NLS* model in T.44 standard.
A segment is a rectangular area on the bitmap that can be classified as text, grayscale, or picture, depending on the number of colors used in its area. The Mixed Raster Content (MRC) format was developed by the International Telecommunications Union as part of ITU-T Recommendation T.44. For more information on Mixed Raster Content (MRC) formats, refer to General Segmentation.
Use the Save method to save a file in one of the LEAD proprietary MRC formats or PDF file based on LEAD segmentation technique if you want to:
Take advantage of the greater number of different segment types available when using the proprietary format.
Create smaller files than would be possible by saving them to the Standard T44 format.
Create higher quality files than would be possible by saving them to the Standard T44 format.
Please note that the LEAD proprietary T44 format file is a single-page file format, while the TIF file with a LEAD MRC subtype format is a multi-paged file format.
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.
It is best to perform segmentation before calling the Save method. Segmentation can be performed automatically by calling the AutoSegment method, or manually by calling the CreateNewSegment method. Call the StartSegmentation method before using any of the segmentation functions. Call the StopSegmentation method to end the bitmap segmentation and free all data variables and buffers.
For more information on segmentation, refer to General Segmentation, Auto-Segmentation, and Manual Segmentation.
If segmentation has not been performed before the Save 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 functions using a CombineFactor property of 30, an ImageType property of scanned, and a Text2BitCoder property for JBIG 2-bit. The Save function will use Fax G4 for the MaskCoder property, JPEG compression for the PictureCoder property and 2 for the PictureQFactor property, JPEG compression for the Grayscale8BitCoder property and 2 for the Grayscale8BitQFactor property, and JBIG compression for the Grayscale2BitCoder segments.
When using the Save method, segments can be any of the following types:
SEGTYPE_TEXT_1BIT_BW
SEGTYPE_TEXT_1BIT_COLOR
SEGTYPE_TEXT_2BIT_COLOR
SEGTYPE_GRAYSCALE_2BIT
SEGTYPE_GRAYSCALE_8BIT
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. Set the compression for 2 bit grayscale segments by setting the Grayscale2BitCoder property. JBIG compression can be used. Set the compression for the 8-bit grayscale segments by setting the Grayscale8BitCoder property. JPEG, LEAD CMP or LEAD CMW compression can be used. Set the quality factor for 8-bit grayscale segments by setting the Grayscale8BitQFactor property. Set the compression for pictures by setting the PictureCoder property. JPEG, LEAD CMP or LEAD CMW compression can be used. Set the quality factor for pictures by setting the PictureQFactor property. Set the compression for 2-bit text segments by setting the Text2BitCoder property. JBIG or GIF compression can be used.
Note that the Grayscale2BitCoder property, the Grayscale8BitCoder property, the Grayscale8BitQFactor property, and the Text2BitCoder property are used only with the Save method.
*NLS (N-Layer stripe) means that each stripe may contains one or more mask layers, foreground layers, and background layers.
See Also