virtual L_INT LFile::SaveTile(nCol, nRow, pSaveFileOption=NULL)
Saves the class object's associated bitmap to a specified rectangular location in an existing FlashPix file. It only works with uncompressed FlashPix files. If a compressed FlashPix file is passed in, an error will be returned.
Left column number of tile.
Top row number of tile.
Pointer to optional extended save options. Pass NULL to use the default save options.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
This function supports the LFile::SaveFileTileCallBack virtual function.
This function only works with uncompressed FlashPix files.
Note: More information is available in the SAVEFILEOPTION structure.
Support for 12 and 16-bit grayscale images is only available in the Document/Medical toolkits.
This function does not support signed data images, unless they are DICOM images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image that is not a DICOM image is passed to this function.
This function supports signed data images, but only DICOM and TIFF formats support signed data. This function will return an error code if you attempt to save a signed image to a format other than DICOM or TIFF.
If the bitmap has a region, the region stored in the bitmap will be saved, if the image is saved as one of the TIFF file formats.
In LEADTOOLS version 17 and up, when saving a colored image (such as a 24-bits per pixel image) to bitonal (1-bit per pixel), the toolkit will not use any dithering when converting the image data. This is done because dithering is not the recommended when converting colored images containing text for document processing such as OCR and Barcode. The result text will be fuzzy and hard for a recognition engine to process. To save a colored image as bitonal with Floyd-Stein dithering (the behavior of LEADTOOLS 16.5 and earlier) use the ESO_USEDITHERINGMETHOD along with LBitmapBase::SetDitheringMethod as illustrated below:
// 'leadBitmap' is a colored LBitmapBase
// 'leadFile' is LFile object
// Setup FloydStein dithering:
leadBitmap.SetDitheringMethod(FLOYD_STEIN_DITHERING);
SAVEFILEOPTION saveOptions = {0};
leadFile.GetDefaultSaveFileOption(&saveOptions, sizeof(SAVEFILEOPTION));
saveOptions.Flags |= ESO_USEDITHERINGMETHOD;
leadFile.Save(FILE_CCITT_GROUP4, 1, 0, 0, &saveOptions);
// or any other Save overloads or methods
Win32, x64.
For an example, refer to LFile::LoadTile.
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document