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𚰱
Message was edited by:
jimberry (to get code displaying correctly again)
Message was edited by: jimberry