iPhoto, JPEGs and Metadata in 10.4
While responding to an email asking about IPTC data in iPhoto, I started thinking how great it would be to store iPhoto’s information as Spotlight extended attributes, but I found that Apple did it already! This is a great idea and I was glad to see it.
The mdls [file] terminal command will list all metadata associated with the specified file. (The easiest way to see this is to type “mdls”, space, then drag a file into the terminal window)
Anything in iPhoto with keywords or a title should have these two additional bits of metadata attached to them as HFS extended attributes:
kMDItemKeywords = ("3rd Avenue", Mirror, Sidewalk, NYC)
kMDItemTitle = "Man Walking with Mirror 1"
It’s great to see this but it’s not especially portable yet. Anyone know how to write IPTC data from the command line?

To write, modifiy IPTC (and EXIF), i use EXIFUtils :
http://www.hugsan.com/EXIFutils
Writing IPTC from commandline should be possible by using ImageMagick…