Compressing and Decompressing Buffers - Namespace - Raster, Medical, Document Help

Compressing and Decompressing Buffers

LEADTOOLS provides several methods/classes for compressing and decompressing images in buffers.

To begin the compression process, the StartCompress method must be called. This method initializes the compression engine, sets the characteristics such as compression factor and output type for the compression. The CodecsCompressDataCallback delegate passed to the method will handle the compressed data. Compression is actually carried out by calling the Compress method Once the Compress method is called, the CompressData event is called each time the buffer is filled with compressed data, or when the compression is complete. When compression is completed, call the StopCompress method

To begin the decompression process, the StartDecompress method must be called. This method initializes the decompression engine and establishes characteristics of the decompression, such as whether strips or tiles will be decompressed, the format of the image, the view perspective, the load order, and where to place the decompressed image. For more information about the decompression characteristics set by this method, refer to the CodecsStartDecompressOptions class. For each strip or tile to be decompressed, the Decompress method must be called. When decompression is completed, call the StopDecompress method.

TWAIN buffer transfers can return data in raw compressed form. These methods provide a means of decompressing this data. Consequently, these methods only work for certain file types. These file types and the corresponding TWAIN constant are given below:

Help Version 20.0.2018.8.13
Products | Support | Contact Us | Copyright Notices
© 1991-2018 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document