transforms

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

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

func NewImageInfo(metadata bimg.ImageMetadata, format string) ImageInfo

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) Grayscale

func (t *Transforms) Grayscale()

Grayscale convert image to B&W

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

func (*Transforms) Watermark

func (t *Transforms) Watermark(image string, position string, opacity float32) error

Watermark merge two image in one

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL