OPTIMIZEIMAGEOPTIONS

typedef struct _tagOPTIMIZEIMAGEOPTIONS 
{ 
   L_UINT uStructSize; 
   L_UINT uJPEGQFactor; 
   L_UINT uPNGQFactor; 
   JPEGCOLORSPACE JPEGColorSpace; 
   L_INT nPercent; 
   L_UINT uDistance; 
   L_BOOL bPickSamePalette; 
} OPTIMIZEIMAGEOPTIONS, *pOPTIMIZEIMAGEOPTIONS; 

The OPTIMIZEIMAGEOPTIONS structure provides options to be used by the Image Optimization functions to optimize the image and save it using the optimal bits per pixel.

Member Description
uStructSize Size of this structure in bytes, for versioning. Use the sizeof() macro to calculate this value.
uJPEGQFactor Value that represents the quality factor used in the image optimization operation. The uJPEGQFactor is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 represent the highest quality and 255 represent the most compression.

This value is used only if the original image format is one of the JPEG formatslisted in LEAD Image Optimizer Supported Formats.

The default value is 35.

uPNGQFactor Value that represents the quality factor to be used in the image optimization operation.

The uPNGQFactor can be a value between 0 and 10 where

0 = default compression   1 = fastest compression   .  .  .   9 = highest compression ratio   10 = no compression

This value is used only if the original image format is (FILE_PNG).

The Default value is 9.

JPEGColorSpace Value that represents the color space to be used in the image optimization operation if and only if the original image format was one of the JPEG formats listed in LEAD Image Optimizer Supported Formats.  For more information refer to JPEGCOLORSPACE. The default value is JPEG_COLORSPACE_411.
nPercent Value that represents the percent of redundancy to be used in the image optimization operation. This value will be used if the original image format was:
  • PNG File (FILE_PNG). 

  • GIF File (FILE_GIF). 

  • One of LEAD Supported BMP Formats with 1, 4, and 8 bits per pixel only.

The nPercent value can be a value between 0 and 100.

The default value is 10.

uDistance Value that represents the distance between image colors to be reduced in the image optimization operation. This value will be used if the original image format was:
  • PNG File (FILE_PNG). 

  • GIF File (FILE_GIF). 

  • One of LEAD Supported BMP Formats with 1, 4, and 8 bits per pixel only. 

The uDistance value can be a value between 0 and 255, where:

  • 0 means no additional reduction. 

  • 1 to 255 further reduction based on the color distance 

The default value is 8.

bPickSamePalette Flag that indicates whether to generate a unique global palette for all GIF frames or generate a separate palette for each frame. Possible values are:
  Value Meaning
  TRUE Generate A Unique Global Palette for all GIF Frames.
  FALSE Generate individual palette for each GIF Frame.
  The default value is FALSE.

Comments

This structure is used only by the Image Optimizing functions:

L_OptGetDefaultOptions function.

L_OptOptimizeBuffer function.

L_OptOptimizeDir function.

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Raster Imaging C API Help