ImageGear for C and C++ on Windows v20.0 - Updated
IG_save_JPEG_quality_get
API Reference Guide > Core Component API Reference > Core Component Functions Reference > Save Functions > IG_save_JPEG_quality_get

This function returns the current setting for JPEG quality.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI IG_save_JPEG_quality_get(
   LPUINT lpQuality
);

Arguments:

Name Type Description
lpQuality LPUINT A pointer to a UINT variable which will receive the current setting for JPEG quality.

Return Value:

Returns 0 if successful. Otherwise, returns the number of ImageGear errors that occurred during this function call.

Supported Raster Image Formats:

This function does not process image pixels.

Sample:

None

Example:

 
Copy Code
UINT      lpQuality;
AT_ERRCOUNT nErrcount = IG_save_JPEG_quality_get(&lpQuality);

Remarks:

The quality level is the amount of data loss that will occur during JPEG compression. The default algorithm for JPEG compression used by ImageGear is a lossy scheme. This means that some data will always be lost during compression. Use this function to set the level of loss, where 100 means the least amount possible of pixel data will be lost during compression, and 1 allows the most loss (resulting in the smallest possible file after compression). Please see JPEG format filter description for more details.

JPEG quality is only used when an image is being saved, not during the decompression process.

This function has the same effect as using IG_fltr_ctrl_get to get the value of the "QUALITY" control parameter for IG_FORMAT_JPG format filter.

Use IG_save_JPEG_quality_set to change the current setting.

Is this page helpful?
Yes No
Thanks for your feedback.