forked from ivanhe810/imgResize
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.html
More file actions
30 lines (28 loc) · 693 Bytes
/
demo.html
File metadata and controls
30 lines (28 loc) · 693 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
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<input type="file" name="" value="">
<script src="./dist/resize.min.js">
</script>
<script>
(function() {
let input = document.querySelector('input')
input.addEventListener('change', function (e) {
canvasResize(this.files[0], {
crop: false,
quality: 0.9,
rotate: 0,
callback(baseStr) {
console.log(baseStr.length)
}
})
})
})()
</script>
</body>
</html>