mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-09 07:28:44 -07:00
feat(#1): initial implementation
This commit is contained in:
parent
8bcefc7736
commit
63f4b01c8d
14 changed files with 465 additions and 1 deletions
29
options.go
Normal file
29
options.go
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
package bimg
|
||||
|
||||
const QUALITY = 80
|
||||
|
||||
type Gravity int
|
||||
|
||||
type Interpolator int
|
||||
|
||||
var interpolations = map[Interpolator]string{
|
||||
BICUBIC: "bicubic",
|
||||
BILINEAR: "bilinear",
|
||||
NOHALO: "nohalo",
|
||||
}
|
||||
|
||||
func (i Interpolator) String() string {
|
||||
return interpolations[i]
|
||||
}
|
||||
|
||||
type Options struct {
|
||||
Height int
|
||||
Width int
|
||||
Crop bool
|
||||
Enlarge bool
|
||||
Extend int
|
||||
Embed bool
|
||||
Interpolator Interpolator
|
||||
Gravity Gravity
|
||||
Quality int
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue