-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.html
More file actions
31 lines (26 loc) · 789 Bytes
/
Copy pathtest.html
File metadata and controls
31 lines (26 loc) · 789 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!doctype html>
<html>
<head>
<script type="text/javascript" src="exif.js"></script>
</head>
<body>
Upload a local file to read Exif/xmp/iptc data.
<br/>
<input id="file-input" type="file" />
<br/><br/>
<pre id='data'></div>
<script>
document.getElementById("file-input").onchange = function(e) {
EXIF.getData(e.target.files[0], function() {
var exifData = JSON.stringify(this.exifdata, null, 2)
var iptcData = JSON.stringify(this.iptcdata, null, 2)
var xmpData = JSON.stringify(this.xmpdata, null, 2)
var prettPrinter = "IPTC DATA: " + iptcData +
"\n\nXMP DATA: " + xmpData +
"\n\nEXIF DATA: " + exifData;
document.getElementById('data').innerHTML = prettPrinter;
});
}
</script>
</body>
</html>