Photo watermark/resize script
Script to batch add a SVG watermark to and/or resize JPG files.
watermarker.sh
to your $PATH
*Make sure to resize the svg to fit content (File > Document properties in
Inkscape)
-s Size of output image (<width>x<height>, <width>x, <height>y)
-w SVG file to use as watermark
-a Text to append to processed file names
-o Output path of processed files (default='watermarker/')
-h Shows this usage description
-x Shows some usage examples
$ ./watermarker.sh -w my_watermark.svg -s 1080y -o ~/path_to_output/
$ ./watermarker.sh -w my_watermark.svg -o ~/path_to_output/
$ ./watermarker.sh -w my_watermark.svg -a "_watermarked"
$ ./watermarker.sh -s 1080x -o -a "_x1080" ~/path_to_output/
$ ./watermarker.sh -s 1080x1920
The shell script uses the following command line tools: convert
and composite
(ImageMagick), getopts
.
If you find this useful or even adapt the script for other things you can show
some love by starring this repo.