forked from g21589/wmf2canvas
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (39 loc) · 1.14 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
42
43
44
45
46
47
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>WMF2Canvas</title>
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="js/sprintf.min.js"></script>
<script src="js/bundle.js"></script>
<script src="js/wmf.js"></script>
<script>
window.onload = function() {
let wmf = new WMFConverter();
let canvas = document.getElementById("canvas");
let file = document.getElementById("file");
file.onchange = function() {
let filename = this.files[0];
wmf.toCanvas(filename, canvas, function(obj) {
document.getElementById("exe_time").innerText = obj.executeTime.toFixed(2) + " (ms)";
});
}
};
</script>
</head>
<body>
<div class="container">
<h1>WMF2Canvas<sup>Beta</sup></h1>
<h3>WMF (Windows Metafile)</h3>
<br>
<h4>Choose WMF file</h4>
<input type="file" id="file" accept="image/x-wmf"/>
<h4>Result <span id="exe_time"></span></h4>
<canvas id="canvas" class="img-thumbnail" style=""></canvas>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>