Help with batch watermarking jpg after photobooth
Posted: 2018-12-31T12:57:55-07:00
Hello, I would like to add a watermark to all images generated from a photobooth program stored in a folder on my raspberry pi. Could someone please guide me to creating the script and the folder? I've been searching everywhere but I can't seem to run the program successfully on my raspberry pi. thank you.
I want to do something that was written on this website: https://www.xoogu.com/2013/how-to-autom ... /#comments
for i in ./*.jpg ./*.jpeg
do
if [ ! -d "./watermarked" ]; then mkdir "./watermarked"; fi
filename=$(basename "$i")
~/apps/ImageMagick/bin/convert \
-filter Lanczos \
"$i" \
-set option:filter:filter Lanczos \
-set option:filter:blur 0.8 \
-resize 500x500 \
-quality 80 \
../watermark-small.png -gravity SouthEast -geometry +30 -composite \
"./watermarked/$filename"
done
I've created a .sh file with those parameters, and placed it in the folders containing the images, but when I ran the program it says:
watermark.sh: 11: watermark.sh: /home/pi/apps/ImageMagick/bin/convert: not found
watermark.sh: 13: watermark.sh: -filter: not found
watermark.sh: 15: watermark.sh: ./photobooth00001.jpg: Permission denied
watermark.sh: 17: watermark.sh: -set: not found
watermark.sh: 19: watermark.sh: -set: not found
watermark.sh: 21: watermark.sh: -resize: not found
watermark.sh: 23: watermark.sh: -quality: not found
watermark.sh: 25: watermark.sh: ../borders.png: not found
watermark.sh: 27: watermark.sh: ./watermarked/photobooth00001.jpg: not found
watermark.sh: 11: watermark.sh: /home/pi/apps/ImageMagick/bin/convert: not found
watermark.sh: 13: watermark.sh: -filter: not found
watermark.sh: 15: watermark.sh: ./*.jpeg: not found
watermark.sh: 17: watermark.sh: -set: not found
watermark.sh: 19: watermark.sh: -set: not found
watermark.sh: 21: watermark.sh: -resize: not found
watermark.sh: 23: watermark.sh: -quality: not found
watermark.sh: 25: watermark.sh: ../borders.png: not found
watermark.sh: 27: watermark.sh: ./watermarked/*.jpeg: not found
pi@raspnode:~/Desktop/PHOTOBOOTH PICTURES $
I want to do something that was written on this website: https://www.xoogu.com/2013/how-to-autom ... /#comments
for i in ./*.jpg ./*.jpeg
do
if [ ! -d "./watermarked" ]; then mkdir "./watermarked"; fi
filename=$(basename "$i")
~/apps/ImageMagick/bin/convert \
-filter Lanczos \
"$i" \
-set option:filter:filter Lanczos \
-set option:filter:blur 0.8 \
-resize 500x500 \
-quality 80 \
../watermark-small.png -gravity SouthEast -geometry +30 -composite \
"./watermarked/$filename"
done
I've created a .sh file with those parameters, and placed it in the folders containing the images, but when I ran the program it says:
watermark.sh: 11: watermark.sh: /home/pi/apps/ImageMagick/bin/convert: not found
watermark.sh: 13: watermark.sh: -filter: not found
watermark.sh: 15: watermark.sh: ./photobooth00001.jpg: Permission denied
watermark.sh: 17: watermark.sh: -set: not found
watermark.sh: 19: watermark.sh: -set: not found
watermark.sh: 21: watermark.sh: -resize: not found
watermark.sh: 23: watermark.sh: -quality: not found
watermark.sh: 25: watermark.sh: ../borders.png: not found
watermark.sh: 27: watermark.sh: ./watermarked/photobooth00001.jpg: not found
watermark.sh: 11: watermark.sh: /home/pi/apps/ImageMagick/bin/convert: not found
watermark.sh: 13: watermark.sh: -filter: not found
watermark.sh: 15: watermark.sh: ./*.jpeg: not found
watermark.sh: 17: watermark.sh: -set: not found
watermark.sh: 19: watermark.sh: -set: not found
watermark.sh: 21: watermark.sh: -resize: not found
watermark.sh: 23: watermark.sh: -quality: not found
watermark.sh: 25: watermark.sh: ../borders.png: not found
watermark.sh: 27: watermark.sh: ./watermarked/*.jpeg: not found
pi@raspnode:~/Desktop/PHOTOBOOTH PICTURES $