Overview
Group
Quick Info

ICImageCompress

The ICImageCompress function compresses an image to a given size. This function does not require initialization functions.

HANDLE ICImageCompress(

HIC hic,

UINT uiFlags,

LPBITMAPINFO lpbiIn,

LPVOID lpBits,

LPBITMAPINFO lpbiOut,

LONG lQuality,

LONG * plSize

);

Parameters

hic

Handle of a compressor opened with the ICOpen function. Specify NULL to have VCM select an appropriate compressor for the compression format. An application can have the user select the compressor by using the ICCompressorChoose function, which opens the selected compressor and returns a handle of the compressor in this parameter.

uiFlags

Reserved; must be zero.

lpbiIn

Address of the BITMAPINFO structure containing the input data format.

lpBits

Address of input data bits to compress. The data bits exclude header and format information.

lpbiOut

Address of the BITMAPINFO structure containing the compressed output format. Specify NULL to have the compressor use an appropriate format.

lQuality

Quality value used by the compressor. Values range from 0 to 10,000.

plSize

Maximum size desired for the compressed image. The compressor might not be able to compress the data to fit within this size. When the function returns, this parameter points to the size of the compressed image. Image sizes are specified in bytes.

Return Values

Returns a handle to a compressed DIB. The image data follows the format header.

Remarks

To obtain the format information from the LPBITMAPINFOHEADER structure, use the GlobalLock function to lock the data. Use the GlobalFree function to free the DIB when you are finished.

See Also

ICOpen
, ICCompressorChoose, BITMAPINFO, GlobalLock, GlobalFree

Software for developers
Delphi Components
.Net Components
Software for Android Developers
More information resources
MegaDetailed.Net
Unix Manual Pages
Delphi Examples
Databases for Amazon shops developers
Amazon Categories Database
Browse Nodes Database