-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimgpro.go
45 lines (41 loc) · 879 Bytes
/
imgpro.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
42
43
44
45
package imgpro
import (
img "github.com/echosoar/imgpro/core"
pro "github.com/echosoar/imgpro/processor"
)
func initial(features []string) *img.Core {
core := img.New(features)
// size
pro.SizeProcessor(core)
// type
pro.TypeProcessor(core)
// width/height
pro.WHProcessor(core)
// rgba/frame
pro.RGBAProcessor(core)
// hue
pro.HUEProcessor(core)
// exif
pro.ExifProcessor(core)
// time
pro.TimeProcessor(core)
// device
pro.DeviceProcessor(core)
// position
pro.PositionProcessor(core)
// qrcode
pro.QRCodeProcessor(core)
return core
}
// Run run
func Run(filePath string, features []string) img.Result {
core := initial(features)
core.Run(filePath)
return core.GetResult()
}
// RunBinary run
func RunBinary(imgFileBinary []byte, features []string) img.Result {
core := initial(features)
core.RunBinary(imgFileBinary)
return core.GetResult()
}