Permlink Replies: 25 - Pages: 2 [ 1 2 | Next ] - Last Post: 31-Mar-2008 10:30 Last Post By: davidekholm Threads: [ Previous | Next ]
jimberry

Posts: 516
Registered: 30-Aug-2004
Getting Exif and Iptc metadata into your album
Posted: 14-Sep-2006 17:14
  Click to reply to this thread Reply
Attachment metadata_names.xls (13.0 KB)
A number of users have recently enquired about the possibility of using Exif and/or Iptc metadata in their albums.

JAlbum uses a metadata extraction library written by Drew Noakes.

If you select "Extract photographic data (Exif) on the JAlbum>Advanced>Main tab, some of these data are passed in JAlbum variables.
$objectName=Iptc.Object Name
$author=Iptc.Writer/Editor
$copyright=Iptc.Copyright Notice
$keywords=Iptc.Keywords
$comment (can be any of several tags - Will be extracted from one of the following:
1. An external "texts.properties" file.
2. The JPEG comment section of an image file.
3. The IPTC caption section of an image file.
4. The EXIF user comment section of an image file.
(See JAlbum Tutorials for further explanation - http://jalbum.net/skincreation.jsp )

Some skins allow you to select some of these in the user interface, or you can incorporate into the album by editing the template files and adding this code where you want the metadata to appear
<ja:if exists="copyright">$copyright</ja:if> 

(replace "copyright" with whichever JAlbum variable you want to use.

If the metadata that you require is not available as a JAlbum variable, it is still possible to obtain it, using a script like this

<ja:if exists="meta"> Author <%= meta.get("Iptc.Byline") %></ja:if> 


(Replace "Author" with whatever label you want to appear beside the data (it any), and replace "Iptc.Byline" with the appropriate metadata name.

The template files you need to edit are "slide.htt" for slide pages or "index.htt" for index pages. (See "Modifying a Skin" tutorial at http://jalbum.net/addbuttons.jsp ).

You can populate the Iptc and some of the Exif fields with Exifer, Irfanview or BreezeBrowser or some other graphics programs. Unfortunately, there is some inconsistency in naming the various fields, so I have attached to this post a spreadsheet showing the official standard tag names as specified in the Iptc and Exif specifications, along with the names used in BreezeBrowser, Irfanview and Exifer. The Drew Noakes library uses the official names, other programs use their own variations. The table was extracted from http://doug.kerr.home.att.net/pumpkin/Annotation.pdf


Here are the script statements to retrieve the various JAlbum variables -

<ja:if exists="objectName">Object Name: $objectName</ja:if>
<ja:if exists="author">Author: $author</ja:if>
<ja:if exists="copyright">$copyright</ja:if>
<ja:if exists="comment">$comment</ja:if>
<ja:if exists="keywords">$keywords</ja:if>

Tags not available as JAlbum variables can be obtained as follows -]

<ja:if exists="meta">
 
<%= meta.get("Iptc.By-line") %>
<%= meta.get("Iptc.Object Name") %>
<%= meta.get("Iptc.Headline") %>
<%= meta.get("Iptc.Caption/Abstract") %>
<%= meta.get("Iptc.Writer/Editor") %>
<%= meta.get("Iptc.Copyright Notice") %>
<%= meta.get("Iptc.City") %>
<%= meta.get("Iptc.Province/State") %>
<%= meta.get("Iptc.Country/Primary Location") %>
<%= meta.get("Iptc.By-line") %>
<%= meta.get("Iptc.Keywords") %>
 
<%= meta.get("Image Description") %>
<%= meta.get("Artist") %>
<%= meta.get("Copyright") %>
<%= meta.get("User Comment") %>
 
<%= meta.get("JpegComment.Jpeg Comment") %>
</ja:if>

Use as many of the above lines as you need and delete the ones that you don't want, but don't forget to include the <ja:if exists="meta"> and </ja:if> tags.

NOTE: Of course, you will need to insert your own formatting, If you use all the above code as an initial test, I suggest at least inserting a line-break
 <br> 
after each line.

<<<<<<Added later>>>>
In line with David's suggestion below, the following syntax is more concise, but I can only get it to work with Exif tags, not with Iptc or Jpeg tags :-

Description ${meta.Image Description}
Artist ${meta.Artist.}
Copyright ${meta.Copyright}
Comment ${meta.User Comment}

i.e. Author ${meta.Iptc.Byline} does not work for me
<<<<<<end of added message>>>>>>>>>>>>

Further information is available at

http://www.drewnoakes.com/code/exif/
http://www.controlledvocabulary.com/imagedatabases/iptc_naa.html#IPTCchart
http://doug.kerr.home.att.net/pumpkin/Annotation.pdf

Message was edited by:
jimberry

<<<<<ADDED 12/10/2006>>>>>>>>>>
I have replaced the attached spreadsheet with an updated version including names used by other programs.
The additional information was supplied by FredT in another thread at http://jalbum.net/forum/thread.jspa;jsessionid=JGIIMMNLCCLD?messageID=109617&#109617

Message was edited by:
jimberry (to get code displaying correctly again)

Message was edited by: jimberry

MarkE

Posts: 105
Registered: 24-Apr-2006
Re: Getting Exif and Iptc metadata into your album
Posted: 14-Sep-2006 19:53   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
Good stuff!
davidekholm

Posts: 3,576
Registered: 18-Oct-2002
Re: Getting Exif and Iptc metadata into your album
Posted: 14-Sep-2006 21:10   in response to: MarkE in response to: MarkE
  Click to reply to this thread Reply
I agree. Good compilation. Just another note. The syntax:
<ja:if exists="meta"> Author <%= meta.get("Iptc.Byline") %></ja:if>
can also be written like this:
Author ${meta.Iptc.Byline}
jimberry

Posts: 516
Registered: 30-Aug-2004
Re: Getting Exif and Iptc metadata into your album
Posted: 15-Sep-2006 05:47   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Thanks, David - that improved syntax represents a compression rate of 25%!!!!!!!!! ;-)
I am a complete novice at java, so a lot of my attempts at java, javascript and beanshell stuff could probably be greatly improved with a bit of expert guidance like that.

If anyone with access to Photoshop or other programs with different names for metadata fields would like to extend that spreadsheet, please do so!
jimberry

Posts: 516
Registered: 30-Aug-2004
Re: Getting Exif and Iptc metadata into your album
Posted: 15-Sep-2006 11:24   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
David,
If I use the following code (extracting the same data using both my original syntax and your suggested shorter syntax), the first syntax type returns metadata for all cases
The second only returns for Exif, not for Iptc or Jpeg. Am I missing something?
<br><br>
<ja:if exists="meta">
 
<%= meta.get("Iptc.By-line") %><br>
<%= meta.get("Iptc.Object Name") %><br>
<%= meta.get("Iptc.Keywords") %><br><br>
 
<%= meta.get("Image Description") %><br>
<%= meta.get("Artist") %><br>
<%= meta.get("Copyright") %><br>
<%= meta.get("User Comment") %><br><br>
 
<%= meta.get("JpegComment.Jpeg Comment") %><br><br>
</ja:if>
 
Iptc tags<br>
Author ${meta.Iptc.By-line}<br>
Name ${meta.Iptc.Object Name}<br>
Keywords ${meta.Iptc.Keywords}<br><br>
 
Exif tags<br>
Description ${meta.Image Description}<br>
Artist ${meta.Artist.}<br>
Copyright ${meta.Copyright}<br>
Comment ${meta.User Comment}<br><br>
 
Jpeg tag<br>
Comment ${meta.JpegComment.Jpeg Comment}


Message was edited by: jimberry
(to get code displaying correctly again)
nakaminow

Posts: 14
Registered: 10-Nov-2003
Re: Getting Exif and Iptc metadata into your album
Posted: 15-Sep-2006 13:54   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
Same problem here.. :-(
Can't get David's syntax to work.

Here is a sample with all the IPTC tags I can get with the "<%= meta.get("Iptc.Xxxx") %> method.

Tag name are the one I get with "meta.get" (no re naming)

(Have changed "IPTC Source" tag manually, could not past an URL from within the tag)
nakaminow

Posts: 14
Registered: 10-Nov-2003
Re: Getting Exif and Iptc metadata into your album
Posted: 17-Sep-2006 17:42   in response to: nakaminow in response to: nakaminow
  Click to reply to this thread Reply
Attachment slide.htt (24.3 KB)
I have updated my sample, I now use a little java script to show the IPTC tags.
The script can be downloaded from HERE

I can still not get David's syntax to work, so I have used for each tag the good old method : :-)

<ja:if test="<%= meta.get("Iptc.By-line") != null%>">IPTC By-line : <strong><%= meta.get("Iptc.By-line") %></strong>


grrrrrrrrrrr sorry for the "[ nobr ]" that is automatically added if code lines are long ...

So if you want the code from my sample, just take it in my slide.htt in "attached file", I can not post it in the message... or me board look's really horrible.. ;-)
davidekholm

Posts: 3,576
Registered: 18-Oct-2002
Re: Getting Exif and Iptc metadata into your album
Posted: 19-Sep-2006 11:12   in response to: nakaminow in response to: nakaminow
  Click to reply to this thread Reply
Sorry about that issue guys. I guess it boils down to the use of a dot (.) to separate iptc from their variable names. The dot has a special meaning in this short syntax (shortening for .get("variable name") )
jimberry

Posts: 516
Registered: 30-Aug-2004
Re: Getting Exif and Iptc metadata into your album
Posted: 19-Sep-2006 16:03   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
ah! I thought that "dot" might have something to do with it.
At least the shorter syntax works for the Exif tags ;-)
Eneraldo

Posts: 2
Registered: 21-Aug-2006
Re: Getting Exif and Iptc metadata into your album
Posted: 19-Sep-2006 21:23   in response to: davidekholm in response to: davidekholm
  Click to reply to this thread Reply
Hi people

I'm terribly sorry to post a question here, but the same question remain unanswered in other foruns, and as it's related to Iptc metadata, and this is a recent thread...
I use mainly IPTC fields as much of the pictures I work with are in film, so I work with scans. Scans have no EXIF or it's the wrong one for my purposes: Date.
To post pictures in the qeb I like to have them dated with the date of capture, or the date of the event depicted, that is the same.
The problem is that when Jalbum extracts the 'Iptc.Date Created', through 'meta.get' it is displayed in this form: "E MMM dd hh:mm:ss z yyyy", and I need it to be showed in this form: "dd/MM/yyyy" and I have no clue as how to do that.
I've searched the foruns but the solutions I've found didn't work for me, and I have no programing background, I'm a photographer.
Actualy I'm workaround this by put the date in the form I want in the 'Iptc.Headline' tag along with the actual Headline, but I really would like to use the proper Iptc field for this.
There is some way to do that?

Many thanks and sorry again for cross post and in the wrong place.

Best

Eneraldo Carneiro
MarkE

Posts: 105
Registered: 24-Apr-2006
Re: Getting Exif and Iptc metadata into your album
Posted: 19-Sep-2006 22:26   in response to: Eneraldo in response to: Eneraldo
  Click to reply to this thread Reply
Don't know too much about IPTC, but I create scanned images often, and digital panoramics (which lose their Exif info). I use 2 applications, Exif Viewer and Exifer, to manage Exif data ... the latter will insert Exif date information.

The only drawback I see is that Exifer may not batch process .... I can't remember. I know a lot of people here use Exifer, so you may get some more help.

Mark
Eneraldo

Posts: 2
Registered: 21-Aug-2006
Re: Getting Exif and Iptc metadata into your album
Posted: 19-Sep-2006 23:05   in response to: MarkE in response to: MarkE
  Click to reply to this thread Reply
Thanks Mark

Exifer does batch process, but I don't want to add another program to my workflow. I use Thumbsplus Pro 7 to catalog and write the IPTC on my files, and Pixvue on ocasion when I need something in the OS level.
As a standard procedure I leave the EXIF metadata to be writen by the devices, cameras in special, as it is planned for I supose, and IPTC metadata to identify the content, authorship, copyright, contact info,. So I usually only read EXIF don't write it.
I'm looking for some scripting solution in album creation if there is some. I work in portuguese language environment. I wouldn't care if I had something like yyyy/MM/dd, instead of dd/MM/yyy as there are only numbers and are prety obvious, but week days and mounths in english, and wrong time (hh:mm:ss), when I hardly need the right one, is something I can't live with.

Thanks for the try

Eneraldo Carneiro
Photographer
Brazil
FredT

Posts: 1
Registered: 24-Aug-2006
Re: Getting Exif and Iptc metadata into your album
Posted: 20-Sep-2006 15:14   in response to: Eneraldo in response to: Eneraldo
  Click to reply to this thread Reply
Hello Eneraldo,

JAlbum uses IPTC fields as defined in the MetadataExtractor library written by Drew Noakes. I wuold suggest contacting him directly with you problem:

drew@drewnoakes.com

He is in a trip right now, so he might not respond quickly.

Fred
kasstzam.com

Posts: 2
Registered: 1-Aug-2005
Re: Getting Exif and Iptc metadata into your album
Posted: 11-Oct-2006 17:28   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
I have a slight problem thats becoming a pain due to the increased volume of images Im now processing (over 300 per day).
Im using Picasa to index all the images that come in to my site, then adding IPTC data as a comment to the images, and exporting them to a folder ready to be processed through JAlbum.
Sounds good!... My problem is with the IPTC comment data. Its showing up in Picasa and PS. BUT it's not being picked up by JAlbum. So Im having to re-type all the comments directly into the JAlbum "Edit" section.

Im using a modified version of Chameleon (but its the same in the normal version too), and I wonder if I need to uncheck any of the comment buttons in this skin?
Anyone help with this? An example gallery can be viewed here <a href="http://www.kasstzam.com/newsstream/index.html"> New Stream</a>

jimberry

Posts: 516
Registered: 30-Aug-2004
Re: Getting Exif and Iptc metadata into your album
Posted: 11-Oct-2006 23:23   in response to: kasstzam.com in response to: kasstzam.com
  Click to reply to this thread Reply
On the JAlbum Advanced>Main tab, make sure that "Extract Photographic Data (EXif)" is checked.
There is also a set of checkboxes at the bottom for Comment sources. Make sure that "IPTC" is checked and "Text file" and "JPG" are unchecked.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums