LEADTOOLS provides functionality to optimize certain images 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 Optimization Supported Formats.
To optimize an image buffer in memory use the OptimizeBuffer command.
To optimize an entire directory of images and save the optimized images to another directory, use the OptimizeDirectory command.
Both OptimizeBuffer and OptimizeDirectory require that the user fill in certain optimization options.