- From: <bugzilla@jessica.w3.org>
- Date: Tue, 07 Feb 2012 19:37:14 +0000
- To: public-html-a11y@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=15401 Jonathan E. Magen <yonkeltron@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yonkeltron@gmail.com --- Comment #1 from Jonathan E. Magen <yonkeltron@gmail.com> 2012-02-07 19:37:13 UTC --- (In reply to comment #0) > Hello! > > I suggest to add a read-only property in the DOM interface for the img element > described at: > Might there exist a use-case where a web application might capture a photo from an imaging peripheral and would therefore have a use for setting metadata? Instead, should that happen as a direct manipulation of the bytestream through alternative means such as the Image.toBlob() currently under discussion? If so, does this invalidate the use case of adding a property to the DOM interface in comparison to bundling this functionality as a library? > 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. > In thinking about this, I can conceive of another use case for such a metadata property. Consider the case of a photo taken with a camera on its side such that the resulting image file contains metadata indicating the proper orientation. Note that in the instance of a JPEG file, the EXIF metadata might contain the 'Orientation' property with a value of '0,0 is right top' indicating that the image display should rotate 90 degrees to the right. In that case, I might choose to programmatically apply CSS styling to rotate the image for proper presentation. Alternatively, consider the case where an application might wish to extract geolocation data from an image to plot its point of origin on a map. I feel that this has some interesting possibilities. > Regards! > > SaaĊĦha, Thank you for giving me something very interesting to consider. -- Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
Received on Tuesday, 7 February 2012 19:39:46 UTC