forked from bitbegin/qrcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
image-test.red
56 lines (54 loc) · 1.36 KB
/
image-test.red
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
Red []
#include %image-lib.red
cloak: load %o_fun.jpg
ext-image: image-lib/resize cloak as-pair cloak/size/x + 100 cloak/size/y + 100
new-image: copy cloak
resize-img: copy cloak
grey-img: image-lib/grey cloak
grey2-img: image-lib/grey2 cloak
enlarge-img: image-lib/enlarge cloak 2x2
view [
image cloak
image ext-image
img: image new-image
return
button "up brightness" [
img/image: image-lib/brightness-enhance img/image 2
]
button "down brightness" [
img/image: image-lib/brightness-enhance img/image -2
]
return
button "up contrast" [
img/image: image-lib/contrast-enhance img/image 1.2
]
button "down contrast" [
img/image: image-lib/contrast-enhance img/image 0.8
]
return
button "up width" [
size: resize-img/size
resize-img: image-lib/resize resize-img as-pair size/x + 5 size/y
view [image cloak image resize-img]
]
button "down width" [
size: resize-img/size
resize-img: image-lib/resize resize-img as-pair size/x - 5 size/y
view [image cloak image resize-img]
]
button "up height" [
size: resize-img/size
resize-img: image-lib/resize resize-img as-pair size/x size/y + 5
view [image cloak image resize-img]
]
button "down height" [
size: resize-img/size
resize-img: image-lib/resize resize-img as-pair size/x size/y - 5
view [image cloak image resize-img]
]
return
image grey-img
image grey2-img
;return
image enlarge-img
]