A Simple Logo Standardizer Bash Script with Imagemagick
Furkan Kalkan f9282b062f Fix typo | 3 years ago | |
---|---|---|
LICENSE | 3 years ago | |
README.md | 3 years ago | |
stdlogo.sh | 3 years ago |
A Simple Logo Standardizer Bash Script with Imagemagick
This script standardize the size of brand logos in different formats, shapes and sizes with adding whitespace to them.
This script use Imagemagick, awk and mktemp.
./stdlogo.sh <source_path> <target_path>
Default output is 400x230. Supported logo extensions are .png, .jpg and .svg. You can change configuration parameters in script for advanced usecases.
OUTPUT_BACKGROUND: Output image background color. Opacity not supported yet but can easily added.
OUTPUT_SIZE: Output image wxh size in pixel.
LOGO_TRIM_FUZZ: Trim whitespace color fuzz value in percent. Useful when work with low quality JPEGs.
LOGO_HEIGHT_TOLERANCE: Logo height tolerance in pixel. If resized logo height smaller than height + tolerance, logo will resize to desired height, otherwise logo will resize to desired width.
LOGO_DESIRED_HEIGHT: Desired logo height in output image.
LOGO_DESIRED_WIDTH: Desired logo width in output image.