Talk About Network

Google





Graphics > GIMP (GNU Image Manipulation Program) > Re: Script-fu s...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 6 Topic 3014 of 3173
Post > Topic >>

Re: Script-fu scritp to add border with exif data

by floyd@[EMAIL PROTECTED] (Floyd L. Davidson) Jul 4, 2008 at 07:10 PM

Felix <sucotronic@[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="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.  If you use "exiftool" to get the information
it is much faster.

Here's a quick revision.  (More could be done, but I'm
pressed for time right now.)

#!/bin/bash

if [ $# != 3 ] ; then
  echo "Modo de uso: marco_foto.sh foto.jpg 20 \"comentario\""
  echo "foto.jpg -> nombre de la foto"
  echo "20 -> tamaņo de la letra"
  echo "\"comentario\" -> comentario de la foto"
  exit 1
fi

if ! test -r $1 ; then
  echo "Cannot read file: $1"
  exit 2
fi

if [ $2 -gt 3 -a $2 -lt 100 ] ; then
  SIZE=$2
else
  echo "Font size \"$2\" out of range (3 to 100)."
  exit 3
fi

TIME=$(exiftool -s -s -s -ExposureTime            $1)
MM=$(exiftool   -s -s -s -FocalLengthIn35mmFormat $1)
ISO=$(exiftool  -s -s -s -ISO                     $1)
FF=$(exiftool   -s -s -s -FNumber                 $1)

if [ "." != ${1: -4:1} ] ; then
  NOMBRE=$1
else
  NOMBRE=${1%%${1: -4}}
fi

montage  -geometry +0+0  \
 -pointsize $SIZE  \
 -background black \
 -fill white       \
 -label "ISO $ISO \| f\/$FF \| $TIME s \| $MM \n $3" \
 $1 ${NOMBRE}_con_marco.jpg



-- 
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)              floyd@[EMAIL PROTECTED]

 




 6 Posts in Topic:
Script-fu scritp to add border with exif data
Felix <sucotronic@[EMA  2008-07-04 01:04:14 
Re: Script-fu scritp to add border with exif data
floyd@[EMAIL PROTECTED]   2008-07-04 00:52:10 
Re: Script-fu scritp to add border with exif data
Felix <sucotronic@[EMA  2008-07-04 10:48:17 
Re: Script-fu scritp to add border with exif data
floyd@[EMAIL PROTECTED]   2008-07-04 19:10:11 
Re: Script-fu scritp to add border with exif data
Felix <sucotronic@[EMA  2008-07-07 10:34:01 
Re: Script-fu scritp to add border with exif data
floyd@[EMAIL PROTECTED]   2008-07-07 22:52:57 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 22:02:57 PST 2009.