LEADTOOLS OCR Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.22
Speeding Up 1-Bit Documents

(Document/Medical only) With the LEADTOOLS Document/Medical toolkit, you can improve the load and display performance of 1-bit images that are commonly used for document storage and FAX transmission.

LEADTOOLS achieves this speed improvement by letting you load an image in its RLE-compressed format, where you can work with it as if it were a fully-expanded image. This not only speeds the throughput and storage, but also speeds up the display of large images that are scaled to fit a window. The display improvement is achieved because, internally, it is no longer necessary to decompress all lines of data to display the scaled-down image.

You can benefit from this feature when loading files that are stored in the LEAD 1-Bit, TIFF Group 3 or Group 4, IOCA, WinFax, or raw FAX formats. To see whether a file can be loaded this way, you can call the RasterCodecs.GetInformation method. This method returns a CodecsImageInfo object that contains the requested information.

To load a 1-bit image in its compressed format, you can set the CodecsLoadOptions.Compressed property before calling any of the following methods:

After an image is loaded, you can check the CodecsImageInfo.Compression property to see if the image is compressed.

Once a compressed image is loaded, you can use LEADTOOLS methods to access it just as you would any other 1-bit image.

The ChangeCompression method can be used to uncompress images, compress 1-bit images using RLE compression, or super compress 1-bit or 24-bit images.