mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-08 23:18:19 -07:00
parent
58b2be80a5
commit
cc2290cb45
8 changed files with 305 additions and 88 deletions
21
options.go
21
options.go
|
|
@ -55,10 +55,20 @@ const (
|
|||
VERTICAL Direction = C.VIPS_DIRECTION_VERTICAL
|
||||
)
|
||||
|
||||
type Insert struct {
|
||||
Top int
|
||||
Left int
|
||||
Buffer []byte
|
||||
// Color represents a traditional RGB color scheme
|
||||
type Color struct {
|
||||
R, G, B uint8
|
||||
}
|
||||
|
||||
type Watermark struct {
|
||||
Width int
|
||||
DPI int
|
||||
Margin int
|
||||
Opacity float32
|
||||
NoReplicate bool
|
||||
Text string
|
||||
Font string
|
||||
Background Color
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
|
|
@ -78,9 +88,10 @@ type Options struct {
|
|||
Flip bool
|
||||
Flop bool
|
||||
NoAutoRotate bool
|
||||
Colorspace bool
|
||||
Rotate Angle
|
||||
Insert Insert
|
||||
Gravity Gravity
|
||||
Watermark Watermark
|
||||
Type ImageType
|
||||
Interpolator Interpolator
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue