-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathscript.js
57 lines (44 loc) · 789 Bytes
/
script.js
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
48
49
50
51
52
53
54
55
56
57
var foto;
window.onload = function() {
foto = new Foto();
}
function selectImage() {
document.getElementById('foto-file').click();
}
function grayscale(){
foto.grayscale();
}
function bright(){
foto.makeBright();
}
function dark(){
foto.makeDark();
}
function blur_effect() {
foto.applyBlurFilter();
}
function emboss() {
foto.applyEmbossFilter();
}
function sharp() {
foto.applySharpFilter();
}
function download(){
foto.export();
}
function flip_img(){
foto.flipVertically();
}
function crop(){
foto.cropSelected();
}
function makeTransparent(){
foto.makeTransparent();
}
function openColorPicker(){
document.getElementById("colorize-color-picker").click();
}
function makeColorize(elem){
var color = elem.value;
foto.applyColorFilter(color);
}