A bash script using ImageMagick to add a logo to an image.
| LICENSE | ||
| README.md | ||
addLogo
A bash script using ImageMagick to add a logo to an image. The logo position is percentage-based and resolution independent. So even if your images got different resolutions, the logo should be roughly in the same position keeping the same size. Extreme aspect ratios may lead to non-optimal placement.
Dependencies
- ImageMagick version 7 or higher
Usage
Execute this script like this:
addlogo /path/to/image /path/to/logo resolution_in_pixels orientation
Example:
addlogo ./backdrop.jpg ~/images/logo.png 3840 bottom-left
Good to know:
- The third argument resizes the main image to fit in a box of named pixels. But only if the image is larger than your argument, otherwise it will keep your current resolution and won't resize your image at all
- The fourth argument overwrites the default orientation defined in the script itself
- Edit this script with
nanoor a text editor of your choice to define the logo size, logo distance to the edges, compression settings and more - So
addlogo ./backdrop.jpg ~/images/logo.pngwould work to if you don't want to resize your image