[Bug 15401] New: metadata in image files

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15401

           Summary: metadata in image files
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: saasha@acc.umu.se
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Hello!

I suggest to add a read-only property in the DOM interface for the img element
described at:

http://dev.w3.org/html5/spec/Overview.html#the-img-element

I would tentatively call it "metadata" and it could be used to read metadata
embedded in the image file. Here is an example:

Let's assume that the @src attribute links to a PNG file. Such files contain
different chunks. As described at
http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.Anc-text one type of
chunk is the iTXt-chunk which contains UTF-8 encoded textual metadata. I
suggest to be able to retrieve such metadata with JavaScript. This could be
achieve with code more or less similar to the following:

img src="foo.png" alt="the foo" id="fooimg"

The JavaScript code could read something similar to:

window.alert(document.getElementById("fooimg").metadata.iTXt.Description);

Likewise, we could retrieve metadata such as: metadata.iTXt.Author
metadata.iTXt.Comment etc. from PNG files and similar metadata from other image
file formats.

Regards!

SaaĊĦha,

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 3 January 2012 15:04:28 UTC