-
Notifications
You must be signed in to change notification settings - Fork 0
/
adjust_test.go
41 lines (36 loc) · 945 Bytes
/
adjust_test.go
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
package imageprocess
import (
"testing"
)
func Test_AdjustBlur(t *testing.T) {
img, f, err := LoadImage("examples/example.jpg")
if err != nil {
t.Error(err)
}
img = AdjustBlur(img, BlurOption{Radius: 10})
SaveImage(img, "examples/out.jpg", f, 100)
}
func Test_AddjustSharpen(t *testing.T) {
img, f, err := LoadImage("examples/example.jpg")
if err != nil {
t.Error(err)
}
img = AddjustSharpen(img, SharpenOption{Value: 1000})
SaveImage(img, "examples/out.jpg", f, 100)
}
func Test_AddjustBright(t *testing.T) {
img, f, err := LoadImage("examples/example.jpg")
if err != nil {
t.Error(err)
}
img = AddjustBright(img, BrightnessOption{Value: 50})
SaveImage(img, "examples/out.jpg", f, 100)
}
func Test_AddjustContrast(t *testing.T) {
img, f, err := LoadImage("examples/example.jpg")
if err != nil {
t.Error(err)
}
img = AddjustContrast(img, ContrastOption{Value: -10})
SaveImage(img, "examples/out.jpg", f, 100)
}