Image Preparer, v1.0.0
Posted on

The utility for image preparation.
The major version.
Change Log
- fix the black color in log messages.
(The change log is compared to the release candidate of the major version. The latter is part of the version 1.5 of the project Wizard Blog New.)
Description
This is the utility for image preparation: resizing of images larger than the specified size and optimization of images in PNG format.
This is a simple script that combines several well-known tools and sets a particular mode for their running.
I use it to prepare images (screenshots and photos) for my blog.
⚠️ Warning! To avoid damaging the images or significantly degrading their quality, the script should not be run repeatedly on files that have already been processed by it.
Features
- search of images:
- recursive search (optionally);
- filtering by a pattern of image filenames (uses a name pattern of the
findtool);
- resizing of images larger than the specified size with the Lanczos filter;
- optimization of images (optionally):
Requirements
- ImageMagick >=6.7.7-10, <7.0;
- pngquant >=2.9.1, <3.0;
- OptiPNG >=0.7.6, <1.0.
Installation of the Requirements
On Ubuntu:
$ sudo apt update \
&& sudo apt install imagemagick-6.q16 pngquant optipng
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 a name pattern of thefindtool; default:*.png);-r,--recursive— recursive search of images;-w WIDTH,--width WIDTH— a maximum width of images (default:640);--no-optimize— don't optimize images.
Arguments:
<path>— base path to images (default:.).
Repository
Link: https://github.com/thewizardplusplus/image-preparer/tree/v1.0.0.
Content: code.
License: MIT.