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 LOptimize::OptimizeBuffer function. The LOptimize::OptimizeBuffer function calls the LOptimize::OptimizeBufferCallBack function repeatedly to notify the user of the percentage of the optimization operation that has been completed.
To optimize an entire directory of images and save the optimized images to another directory, use the LOptimize::OptimizeDir function. The LOptimize::OptimizeDir function calls the LOptimize::OptimizeDirCallBack function to provide the user with information on the image(s) in the directory being optimized.
Both LOptimize::OptimizeBuffer and LOptimize::OptimizeDir, require optimization options for optimizing images. The user can get the default options by calling the LOptimize::GetDefaultOptions function.
Medical Web Viewer .NET