项目作者: An7ar35

项目描述 :
Photo watermark/resize script
高级语言: Shell
项目地址: git://github.com/An7ar35/watermarker.git
创建时间: 2017-10-26T06:00:02Z
项目社区:https://github.com/An7ar35/watermarker

开源协议:MIT License

下载


Photo watermark/resize script

Script to batch add a SVG watermark to and/or resize JPG files.

Usage

  1. Copy the script and watermark.svg file in a local folder,
  2. (optional) Add watermarker.sh to your $PATH
    environment variable to simplify usage.
  3. Edit or replace watermark.svg with your watermark*,
  4. Run script from the directory of the photos you want to process with the desired flags.

*Make sure to resize the svg to fit content (File > Document properties in
Inkscape)

Flags

  1. -s Size of output image (<width>x<height>, <width>x, <height>y)
  2. -w SVG file to use as watermark
  3. -a Text to append to processed file names
  4. -o Output path of processed files (default='watermarker/')
  5. -h Shows this usage description
  6. -x Shows some usage examples

Example

  1. $ ./watermarker.sh -w my_watermark.svg -s 1080y -o ~/path_to_output/
  2. $ ./watermarker.sh -w my_watermark.svg -o ~/path_to_output/
  3. $ ./watermarker.sh -w my_watermark.svg -a "_watermarked"
  4. $ ./watermarker.sh -s 1080x -o -a "_x1080" ~/path_to_output/
  5. $ ./watermarker.sh -s 1080x1920

Dependency

The shell script uses the following command line tools: convert and composite
(ImageMagick), getopts.

Final words

If you find this useful or even adapt the script for other things you can show
some love by starring this repo.