Friday, 4 November 2016

Overview of the Optimize Compression

Batch Image Compressor has several compression options to ensure it suits your needs. In this blog, we'll look at the Optimize Compression.

•  Optimize: Automatically reduces the size of all your images while keeping the best image quality.



Let’s have a look at the process for optimizing a folder: -

1. Enumerate
Fast enumeration of the folder using the Windows 10 indexing service. This returns a link to every image file.

2. Iterate
Go through each of the files found during enumeration and pass it to the Filter engine.

3. Filter
Apply any filters and if the file is applicable, pass it to the Optimize engine.

4. Optimize
Optimizing reduces the file size while keeping the best image quality. To ensure we don’t lose quality, we start with a high-quality setting (100%) and see what the resulting file size would be.
  • If the file size would be smaller, the file is passed to the next stage ‘save’
  • If the file size would be equal, or higher, we increase the compression and try again.
  • This is repeated until the file size is smaller, or the quality level drops below acceptable limits
  • If the file cannot be reduced, we copy the original

All this is performed in memory and uses multiple processor cores for performance.
5. Save
Once the output folder and new filename have been determined, the file is either saved with the new compression level or copied.

Metadata flags that are applicable are also copied.


The result is we have a new set of compressed files that are guaranteed to take up less disk space, but still contain the best quality as possible. 

For individual files this may not be a massive reduction, for that you would use one of the other compression options which we’ll blog about in the coming weeks, but for collections, the accumulative reduction can lead to gigabytes of savings. 

No comments:

Post a Comment