I take a number of steps before uploading my photographs. Tools I use need to be run from the folder where the photographs are located so I right click within the graphical folder and select “open in terminal” . A terminal window opens where any commands that are entered only apply to the photographs in that folder.
I start by running a command to rename files from a .jpg to a .JPG extension.
$ for x in *.JPG; do mv "$x" "${x%.JPG}.jpg"; done
When that is done and if ImagMagick is installed I resize the photographs to 30%
$ mogrify -resize 30% *.JPG
I then remove meta data if ExifTool is installed.
$ exiftool -all= -overwrite_original *.JPG
I like to watermark my photographs with my website url. I create a *.png using the Drawing app. It allows text and the default is black text with a white background. I then make the background transparent using ImageMagick.
$ convert watermark20.png -transparent white watermark22.png
I then use a script file I created previously to install the watermark on each photograph in the folder. Both the transparent watermark and the file should be installed in the folder.In my example if the file is named watermark.sh this command would execute the file contents.
$ ./watermark.sh
Here are the file contents.
#!/bin/bash#run from within directory. Installs watermark on the lower left of photographsfor file in *doextension=${file##*.}if [ ${extension} = "JPG" ] then `composite -gravity SouthWest watermark22.png ${file} ${file}`fidone
When that is finished I upload the photographs.
Leave a Reply