Annotating photographs
Posted: 2015-06-29T20:53:17-07:00
I am using ImageMagick 6.7.7-10 on Linux Mint 17 to annotate many 1000s of genealogy photographs.
I have developed the following script, but it still has a bunch of problems that I am hoping someone can help with.
The code takes the DATE and COMMENT from a jpg and uses it to create an ANNOTATION at the bottom of the photo on an extended canvas area.
The problems are:
1. The current script sometimes takes minutes to run, is there anything in my script that I could change to speed it up?
2. Is there any way to use Mogrify instead of convert so that it will overwrite the file and I do not have to do renames?
3. Is there any way to make all of this one command so that I could use it within FotoXX and similar interfaces?
Any and all suggestions or criticism is welcomed.
I have developed the following script, but it still has a bunch of problems that I am hoping someone can help with.
Code: Select all
cwidth=`identify -format "%[fx:w]" $1`;
cheight=`identify -format "%[fx:h/20]" $1`;
cdate=`identify -format %[Date:exif:DateTimeOriginal] $1`;
cdesc=`identify -format %[IPTC:2:120] $1`;
convert $1 -gravity South -splice 0x${cheight} annotated_$1
convert -background white -fill black -gravity center -size ${cwidth}x${cheight} caption:"$cdate $cdesc" annotated_$1 +swap -gravity south -composite annotated_$1
The problems are:
1. The current script sometimes takes minutes to run, is there anything in my script that I could change to speed it up?
2. Is there any way to use Mogrify instead of convert so that it will overwrite the file and I do not have to do renames?
3. Is there any way to make all of this one command so that I could use it within FotoXX and similar interfaces?
Any and all suggestions or criticism is welcomed.