我知道如何在 GIMP 中使用 BIMP,但我有 20 张照片,我想用不同的字母 AZ 或不同的数字 1-20 批量加水印。所以一张照片是 A,另一张照片是 B,依此类推。
答案1
您可以使用ImageMagick创建bash
脚本来完成此任务:convert
#!/bin/bash
# Change the working directory to the one specified as argument.
if ! cd "$*"; then
echo "error: the folder '$*' doesn't exist."
exit
fi
# Create a directory called "output" into the working directory.
mkdir output &> /dev/null
# Start counting in 1.
counter=1
# For each file that ends in .jpg:
for image in *.jpg; do
convert "$image" \
-background transparent \
-fill grey \
-font ubuntu \
-size 280x160 \
-pointsize 28 \
-gravity southeast \
-annotate +0+0 "TEXT: $counter" \
"output/$image"
# Increment counter by one.
((counter++))
done
用法: bash watermark.sh /home/$USER/folder
记得调整包含图像的文件夹的路径并更改水印的外观或位置。