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.