Image Preparer, v1.3.0
Posted on

The utility for image preparation.
Add the mode without processing of images and improve logging of image changes.
Change Log
- the mode without processing of images, only with search of them and check of their size;
- logging of image changes:
- logging of an image number and name at the beginning of processing;
- fix the bug with zero original size on logging of a change of image sizes;
- remove redundant logging:
- of a total change of image sizes;
- of a global total change of image sizes.
Features
- search of images:
- recursive search (optionally);
- filtering by a pattern of image filenames (uses Perl-compatible regular expressions (PCREs));
- resizing of images larger than the specified size with the Lanczos filter (optionally);
- optimization of images (optionally):
- in PNG format:
- via the pngquant tool;
- via the OptiPNG tool;
- via the
advpngtool from the AdvanceCOMP project;
- in JPEG format:
- via the jpegoptim tool;
- in PNG format:
- the mode without processing of images, only with search of them and check of their size;
- logging of image changes:
- logging of an image number and name at the beginning of processing;
- logging of a change of an image resolution on resizing;
- logging of a change of an image size:
- on the following operations:
- resizing;
- optimization;
- logging of a total change of image sizes:
- total change after all the optimization steps;
- total change after both resizing and optimization operations;
- total change for all images together;
- logging of a saved image size in percent.
- on the following operations:
Usage
$ image_preparer.bash -v | --version
$ image_preparer.bash -h | --help
$ image_preparer.bash [options] [<path>]
Options:
-v,--version— show the version;-h,--help— show the help;-n PATTERN,--name PATTERN— a pattern of image filenames (uses Perl-compatible regular expressions (PCREs); default:(?i)\.(png|jpe?g));-r,--recursive— recursive search of images;-w WIDTH,--width WIDTH— a maximum width of images (default:640);--no-process— don't process images, only search for them and check their size;--no-resize— don't resize images;--no-optimize— don't optimize images.
Arguments:
<path>— base path to images (default:.).
Repository
Link: https://github.com/thewizardplusplus/image-preparer/tree/v1.3.0.
Content: code.
License: MIT.
Screenshots
Optimization of images in PNG format

Optimization of images in JPEG format

Trying to optimize empty images (0 bytes in size)
