Connecting Tech Pros Worldwide Forums | Help | Site Map

Javascript to Access JPEG Metadata XMP, IPTC, EXIF

Reginald Johnson
Guest
 
Posts: n/a
#1: Apr 22 '06
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.

Richard Cornford
Guest
 
Posts: n/a
#2: Apr 23 '06

re: Javascript to Access JPEG Metadata XMP, IPTC, EXIF


Reginald Johnson wrote:[color=blue]
> 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.[/color]

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.


Closed Thread