Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.24
LEADTOOLS Raster imaging C++ Class library help

LMemoryFile::CompressBuffer

Show in webframe

#include "ltwrappr.h"

virtual L_INT LMemoryFile::CompressBuffer(pLBuffer)

LBuffer * pLBuffer;

/* pointer to an LBuffer object */

Does buffer-to-buffer JPEG or LEAD CMP compression. Call this function to compress raw 24-bit BGR or 8-bit grayscale data using input and output buffers that your program allocates.

Parameter

Description

pLBuffer

Pointer to the buffer that holds the data to be compressed. The data in this buffer must not be padded; so you should strip any padding bytes when loading the buffer. The BytesPerLine field in the bitmap handle may include padding. When getting data from a bitmap, it is better to calculate the bytes to get based on the Width and BitsPerPixel fields.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Note: You must call the LMemoryFile::StartCompressBuffer function before using this function, and you must call the LMemoryFile::EndCompressBuffer function to end the compression process. For a description of how these functions work together, refer to LMemoryFile::StartCompressBuffer.

Required DLLs and Libraries

LTFIL
File format DLLs

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Platforms

Win32, x64.

See Also

Functions:

Class Members

Topics:

Raster Image Functions: Saving Files

Example

For an example, refer to LMemoryFile::StartCompressBuffer.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.