On Jul 5, 5:10=A0am, fl...@[EMAIL PROTECTED]
(Floyd L. Davidson) wrote:
> Felix <sucotro...@[EMAIL PROTECTED]
> wrote:
> >Finally I do it the bash way :P more natural for me to implement and
> >understand. I've done a little script with the help of Imagemagick to
> >add the label with the info I want to show. You can see it <a
> >href=3D"http://blog.wikifotos.org/2008/07/04/anadir-marco-descriptivo-
> >con-datos-exif-a-las-fotos/">in this post</a> (sorry I'm Spanish, you
> >can just ignore the content of the page and take a look to the
> >script).
> >Thanks for the help.
>
> Bash scripting is certainly an easier way as far as the
> programming goes!
>
> One point about your script though, is that "identify" is
> extremely slow. =A0If you use "exiftool" to get the information
> it is much faster.
>
> Here's a quick revision. =A0(More could be done, but I'm
> pressed for time right now.)
>
> #!/bin/bash
>
> if [ $# !=3D 3 ] ; then
> =A0 echo "Modo de uso: marco_foto.sh foto.jpg 20 \"comentario\""
> =A0 echo "foto.jpg -> nombre de la foto"
> =A0 echo "20 -> tama=F1o de la letra"
> =A0 echo "\"comentario\" -> comentario de la foto"
> =A0 exit 1
> fi
>
> if ! test -r $1 ; then
> =A0 echo "Cannot read file: $1"
> =A0 exit 2
> fi
>
> if [ $2 -gt 3 -a $2 -lt 100 ] ; then
> =A0 SIZE=3D$2
> else
> =A0 echo "Font size \"$2\" out of range (3 to 100)."
> =A0 exit 3
> fi
>
> TIME=3D$(exiftool -s -s -s -ExposureTime =A0 =A0 =A0 =A0 =A0 =A0$1)
> MM=3D$(exiftool =A0 -s -s -s -FocalLengthIn35mmFormat $1)
> ISO=3D$(exiftool =A0-s -s -s -ISO =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
=A0=
$1)
> FF=3D$(exiftool =A0 -s -s -s -FNumber =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0
$1)
>
> if [ "." !=3D ${1: -4:1} ] ; then
> =A0 NOMBRE=3D$1
> else
> =A0 NOMBRE=3D${1%%${1: -4}}
> fi
>
> montage =A0-geometry +0+0 =A0\
> =A0-pointsize $SIZE =A0\
> =A0-background black \
> =A0-fill white =A0 =A0 =A0 \
> =A0-label "ISO $ISO \| f\/$FF \| $TIME s \| $MM \n $3" \
> =A0$1 ${NOMBRE}_con_marco.jpg
>
> --
> Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
> Ukpeagvik (Barrow, Alaska) =A0 =A0 =A0 =A0 =A0 =A0 =A0fl...@[EMAIL PROTECTED]
for your help. I've added your changes to the script.


|