RE: Using JpegXMPFrame to remotely access XMP inside JPGs over HTTP

Hi guys,

 

            After receiving no response from anyone else who may have
encountered/solved this problem (please see below), I revisited it, had
a look at Jigsaw's source and found fixes to a few problems so that now
I can HTTP Get and Put XMP into/out of JPEGs remotely. I'd like to share
my finds/fixes with you guys so that they can be added to the next
distribution (fixes made to Jigsaw 2.2.6): please find attached the
fixed source files (4 of them) and a short readme of what changes I made
and why. I hope this helps,


Fergal Monaghan

Digital Enterprise Research Institute,
Galway,

Ireland.

 

 

________________________________

From: www-jigsaw-request@w3.org [mailto:www-jigsaw-request@w3.org] On
Behalf Of Monaghan, Fergal
Sent: 01 February 2008 16:11
To: www-jigsaw@w3.org
Subject: Using JpegXMPFrame to remotely access XMP inside JPGs over HTTP

 

Hi guys,

 

            I've been using JpegComFrame to access the comment block
inside JPGs remotely by asking for e.g. 
http://sw.deri.org:8001/Photos/20071009162628.jpg;application%2frdf%2bxm
l

Now I want to switch over to using XMP and JpegXMPFrame: but when I run
JigAdmin there isn't the same dual MIME type options like with
JpegComFrame. The only documentation I can find online on using
JpegXMPFrame are single sentences like "This class will read the XMP
marker from a jpeg file and return it depending on the Accept: header"
[1] or "Used to extract XMP from Jpeg images." [2] From this I can only
guess that it is not possible to simply append the desired MIME type to
the end of the URL, but to create an Accept header in the HTTP request.
I've tried the following Java in an attempt to do this programmatically,
with no luck:

URL modelURL = new
URL("http://sw.deri.org:8001/Photos/20080201141047.jpg");

HttpURLConnection huc = (HttpURLConnection)modelURL.openConnection();

huc.addRequestProperty("accept", "xmp");

            

            How exactly do I use the Accept: header to retrieve just the
XMP metadata over HTTP? What MIME type do I need to specify? Is there
any documentation anywhere that could be useful? Help!


Fergal Monaghan,

PhD Candidate,

Digital Enterprise Research Institute,

National University of Ireland, Galway,

IDA Business Park,

Lower Dangan,

Galway,

IRELAND.

 

[1] 
http://jigsaw.w3.org/Doc/Programmer/api/org/w3c/jigsaw/frames/JpegXMPFra
me.html

[2] http://jigsaw.basemirror.de/Doc/Reference/frames.html

 

Received on Monday, 31 March 2008 14:42:33 UTC