Javascript to Access JPEG Metadata XMP, IPTC, EXIF

R

Reginald Johnson

I'm trying display a popup on the mouseover of a jpeg image. I'm
thinking of trying to populate the popup with text obtained from the
image metadata. However, I haven't been able to find any information on
how to do this with javascript. Is there a way to access image metadata
with javascript.
 
R

Richard Cornford

Reginald said:
I'm trying display a popup on the mouseover of a jpeg image.
I'm thinking of trying to populate the popup with text obtained
from the image metadata. However, I haven't been able to find
any information on how to do this with javascript. Is there a
way to access image metadata with javascript.

Client-side javascript cannot do that as the browser object models do
not expose the data contained in image files loaded into Image objects
or IMG elements. In principle it may be possible to use an XML HTTP
request object to load an image file and then extract the data from
the - responseText -, but having image data interpreted as utf-8 encoded
text and then trying to extract information from the resulting
javascript string is going to be horrendously difficult. Indeed, it
would be more practical to have a server-side resource extract the
information and package it in a form suitable for an XML HTTP request,
and then request the information indirectly.

But, if the information is to be extracted on the server it may as well
be extracted as part of the initial request and included in the page
that displays the images with the mouseover.

Richard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top