18 December, 2023

 

 

To add a watermark to all of the images in a directory:

1. install imagemagick

sudo apt-get install imagemagick

2.  run the following script:

counter=1; total=$(ls my_files_dir/* | wc -l); for img in my_files_dir/*; do echo "Processing file $counter of $total: $img"; convert "$img" -gravity center -pointsize 35 -fill 'maroon' -draw "text 0,0 'my watermark text'" "$img"; ((counter++)); done

16 December, 2023