-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathindex.html
41 lines (33 loc) · 1 KB
/
index.html
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
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery-1.7.1.js"></script>
<script type="text/javascript" src="jquery.exif.js"></script>
</head>
<body>
<form id="myform">
<input type="file" id="file" /> </br>
<label>Camera Model</label>
<input type="text" name="cameraModel" id="cameraModel" /> </br>
<label>Aperture</label>
<input type="text" name="aperture" id="aperture" /> </br>
</form>
<script>
var someCallback = function(exifObject) {
$('#cameraModel').val(exifObject.Model);
$('#aperture').val(exifObject.FNumber);
// Uncomment the line below to examine the
// EXIF object in console to read other values
//console.log(exifObject);
}
try {
$('#file').change(function() {
$(this).fileExif(someCallback);
});
}
catch (e) {
alert(e);
}
</script>
</body>
</html>