Ivan's Blog

Sun, 20 Aug, 2006

URI to extract XMP (ie, RDF) from jpg files on-line

I had, for a long time, a small Python script to extract RDF/XML information from jpg files when that information has been put there by, eg, Adobe’s XMP. Typical example is when one uses the “file info” facility of Adobe Photoshop from Adobe CS or Adobe CS2. The script simply uses a regular expression matching to extract the information, nothing fancy.

I have now made an on-line version of this: one can use URI GET to extract the RDF content on any jpg file via its URI. Here is the example URI to use:

http://www.ivan-herman.net/cgi-bin/xmp.py?uri=http://www.ivan-herman.net/Photos/xmptest.jpg

If no RDF information is found in the file, an empty RDF/XML file is returned. It is one single Python file, you can copy it and install it on another server if you want.

Caveat: I originally intended to use this to access the metadata of my own photos when posted on my Web site. Unfortunately, the tool I use to generate the HTML pages, thumbnails, and the reduced size of the photos themselves does not copy the RDF (ie, XMP) content to the generated file sad. Ie, my photos on the Web do not contain this metadata. Oh well, maybe somebody else will find this script useful…

(I am almost sure there will be bugs in the script. Mail me then…)

Category: /WorkRelated/SemanticWeb; Posted at: 09:31 UTC; Permalink


Blossom's logo