Documentation ¶
Index ¶
- type ImageInfo
- type Transforms
- func (t *Transforms) BimgOptions(imageInfo ImageInfo) (bimg.Options, error)
- func (t *Transforms) Blur(sigma, minAmpl float64) error
- func (t *Transforms) Crop(width, height int, gravity string, enlarge bool) error
- func (t *Transforms) Format(format string) error
- func (t *Transforms) Grayscale()
- func (t *Transforms) Hash() hash.Hash64
- func (t *Transforms) Interlace() error
- func (t *Transforms) Quality(quality int) error
- func (t *Transforms) Resize(width, height int, enlarge bool) error
- func (t *Transforms) Rotate(angle int) error
- func (t *Transforms) StripMetadata() error
- func (t *Transforms) Watermark(image string, position string, opacity float32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageInfo ¶
type ImageInfo struct {
// contains filtered or unexported fields
}
ImageInfo holds information about image
func NewImageInfo ¶
NewImageInfo create new ImageInfo object from bimg metadata
type Transforms ¶
type Transforms struct { NotEmpty bool // contains filtered or unexported fields }
Transforms struct hold information about what operations should be performed on image
func (*Transforms) BimgOptions ¶
func (t *Transforms) BimgOptions(imageInfo ImageInfo) (bimg.Options, error)
BimgOptions return complete options for bimg lib
func (*Transforms) Blur ¶
func (t *Transforms) Blur(sigma, minAmpl float64) error
Blur blur whole image
func (*Transforms) Crop ¶
func (t *Transforms) Crop(width, height int, gravity string, enlarge bool) error
Crop extract part of image
func (*Transforms) Format ¶
func (t *Transforms) Format(format string) error
Format change image format
func (*Transforms) Hash ¶
func (t *Transforms) Hash() hash.Hash64
Hash return unique transform identifier
func (*Transforms) Interlace ¶
func (t *Transforms) Interlace() error
Interlace enable image interlace
func (*Transforms) Quality ¶
func (t *Transforms) Quality(quality int) error
Quality change image quality
func (*Transforms) Resize ¶
func (t *Transforms) Resize(width, height int, enlarge bool) error
Resize change image width and height
func (*Transforms) Rotate ¶
func (t *Transforms) Rotate(angle int) error
Rotate rotate image of given angle
func (*Transforms) StripMetadata ¶
func (t *Transforms) StripMetadata() error
StripMetadata remove EXIF from image
Click to show internal directories.
Click to hide internal directories.