Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Script-fu scritp to add border with exif data
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Felix  
View profile  
 More options Jul 4 2008, 4:04 am
Newsgroups: comp.graphics.apps.gimp
From: Felix <sucotro...@gmail.com>
Date: Fri, 4 Jul 2008 01:04:14 -0700 (PDT)
Local: Fri, Jul 4 2008 4:04 am
Subject: Script-fu scritp to add border with exif data
I've seen that some people add a border to their photos and some
information into it. This information is extracted from the exif
metadata of the photo. I know this is possible to do with photoshop
(http://forums.dpreview.com/forums/read.asp?
forum=1021&message=11882283), but it would be great to do this with
the gimp too. It's possible to do it? I don't find any information
about how to access exif data from a script-fu script.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Floyd L. Davidson  
View profile  
 More options Jul 4 2008, 4:52 am
Newsgroups: comp.graphics.apps.gimp
From: fl...@apaflo.com (Floyd L. Davidson)
Date: Fri, 04 Jul 2008 00:52:10 -0800
Local: Fri, Jul 4 2008 4:52 am
Subject: Re: Script-fu scritp to add border with exif data

Felix <sucotro...@gmail.com> wrote:
>I've seen that some people add a border to their photos and some
>information into it. This information is extracted from the exif
>metadata of the photo. I know this is possible to do with photoshop
>(http://forums.dpreview.com/forums/read.asp?
>forum=1021&message=11882283), but it would be great to do this with
>the gimp too. It's possible to do it? I don't find any information
>about how to access exif data from a script-fu script.

The scheme implemention for Script-Fu is a bit too
limited, as far as I can determine, to do that.

However, I've used Python to access Exif data (via the
Perl program exiftool) to set the date in a "signature"
script.  I'm not exactly an experienced Python programmer,
and it was nothing less than painful to figure out how to
do that...

What exactly would you like to be printed?

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)              fl...@apaflo.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Felix  
View profile  
 More options Jul 4 2008, 1:48 pm
Newsgroups: comp.graphics.apps.gimp
From: Felix <sucotro...@gmail.com>
Date: Fri, 4 Jul 2008 10:48:17 -0700 (PDT)
Local: Fri, Jul 4 2008 1:48 pm
Subject: Re: Script-fu scritp to add border with exif data
On Jul 4, 10:52 am, fl...@apaflo.com (Floyd L. Davidson) 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.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Floyd L. Davidson  
View profile  
 More options Jul 4 2008, 11:10 pm
Newsgroups: comp.graphics.apps.gimp
From: fl...@apaflo.com (Floyd L. Davidson)
Date: Fri, 04 Jul 2008 19:10:11 -0800
Local: Fri, Jul 4 2008 11:10 pm
Subject: Re: Script-fu scritp to add border with exif data

Felix <sucotro...@gmail.com> 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)              fl...@apaflo.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Felix  
View profile  
 More options Jul 7 2008, 1:34 pm
Newsgroups: comp.graphics.apps.gimp
From: Felix <sucotro...@gmail.com>
Date: Mon, 7 Jul 2008 10:34:01 -0700 (PDT)
Local: Mon, Jul 7 2008 1:34 pm
Subject: Re: Script-fu scritp to add border with exif data
On Jul 5, 5:10 am, fl...@apaflo.com (Floyd L. Davidson) wrote:

Thanks for your help. I've added your changes to the script.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Floyd L. Davidson  
View profile  
 More options Jul 8 2008, 2:52 am
Newsgroups: comp.graphics.apps.gimp
From: fl...@apaflo.com (Floyd L. Davidson)
Date: Mon, 07 Jul 2008 22:52:57 -0800
Local: Tues, Jul 8 2008 2:52 am
Subject: Re: Script-fu scritp to add border with exif data

Felix <sucotro...@gmail.com> wrote:
>Thanks for your help. I've added your changes to the script.

Hi Felix,

I've just put on my web site a GIMP script written in
Python that you might be interested in:

  http://web.newsguy.com/floyd_davidson/akforum/signature.py

It is the same basic script that I've been using for a
few months to put a "signature" title on images.  But
over the last few days I hacked it to have the ability
to insert Exif data fields in the way you wanted.

It requires that GIMP be compiled to allow use of
Python.  Put the script into either the
~/.gimp-2.4/plug-ins/ directory or into the global
plug-ins directory, which probably is either
/usr/local/lib/gimp/2.0/plug-ins/ or
/usr/lib/gimp/2.0/plug-ins/.

Note that while it will run as is, there are some
"defaults" that should be configured.  Edit the file and
read the info on what it does, and the first part of the
code is marked as "USER CONFIGURATION AREA" and each
string there should be changed to whatever you want your
default to be.

I sort of threw in the description of what it does and
how to configure it, and I'm not at all sure that it
will make sense to someone else.  Also this did involve
a significant amount of new code, which is yet to really
be tested, so expect a bug or two or more.  (I'll keep
the web page version updated with any later revisions,
so if this is useful you might want to check back every
few months.)

Here are a couple of images that show what it does.  The
first one is what I've been using it for previously.  Note
that the white border is done with a different script, and
is not part of this one.

  http://web.newsguy.com/floyd_davidson/akforum/1304.s.jpg

The two format control strings were "Barrow, Alaska -- %D" and
"Copyright %Y Floyd L. Davidson, fl...@apaflo.com".

The second one shows what it can do now,

  http://web.newsguy.com/floyd_davidson/akforum/d3f_1304a.s.jpg

The two format control strings used used to generate
that title were "f/%A @ %S Seconds, ISO %I with a %l at
%L" and "Copyright %Y %a, %e".

To produce the first one with the new script it could be
left as is, but the defaults that I'm using are "%G -- %D"
and the second one is as shown above.

If you find it useful and want something added or changed,
let me know and I'll see what can be done.

--
Floyd L. Davidson <http://www.apaflo.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska)              fl...@apaflo.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »