Image Optimization

LEADTOOLS provides functionality to optimize certain image file formats, by saving images using the optimal bits per pixel, based on specific optimization options. For more information about the file formats that can be optimized, refer to LEAD Image Optimizer Supported Formats.

To optimize an image buffer in memory use the OptimizeBuffer method.

To optimize an entire directory of images and save the optimized images to another directory, use the OptimizeDir method.

Both OptimizeBuffer and OptimizeDir, require optimization options for optimizing images. The user can get the default options by calling the DefaultOptions method.

Set the following properties in an ILEADOptimizeOptions object to customize the optimization options then pass this object to the OptimizeBuffer method.

JPEGQFactor property

PNGQFactor property

JPEGColorSpace property

Percent property

Distance property

PickSamePalette property

The DirectoryInfo property provides information about the image(s) being optimized. Use the following properties to get this information:

OriginalFileName property

OptimizedFileName property

StatusCode property

FilePercent property

TotalPercent property

TotalFolderFilesCount property

OptimizeOptions property