mirror of
https://github.com/talgo-cloud/bimg.git
synced 2026-03-15 02:15:54 -07:00
refactor(#55): minor changes, use proper declarations, unref image
This commit is contained in:
parent
e83c80c93c
commit
174de89a40
5 changed files with 41 additions and 20 deletions
|
|
@ -80,6 +80,10 @@ type Color struct {
|
|||
R, G, B uint8
|
||||
}
|
||||
|
||||
// Shortcut to black RGB color representation
|
||||
var ColorBlack = Color{0, 0, 0}
|
||||
|
||||
// Text-based watermark configuration
|
||||
type Watermark struct {
|
||||
Width int
|
||||
DPI int
|
||||
|
|
@ -96,6 +100,7 @@ type GaussianBlur struct {
|
|||
MinAmpl float64
|
||||
}
|
||||
|
||||
// Supported image transformation options
|
||||
type Options struct {
|
||||
Height int
|
||||
Width int
|
||||
|
|
@ -117,11 +122,11 @@ type Options struct {
|
|||
NoProfile bool
|
||||
Interlace bool
|
||||
Rotate Angle
|
||||
Background Color
|
||||
Gravity Gravity
|
||||
Watermark Watermark
|
||||
Type ImageType
|
||||
Interpolator Interpolator
|
||||
Interpretation Interpretation
|
||||
GaussianBlur GaussianBlur
|
||||
Background Color
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue