Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Operation ¶
An Operation represents a set of related image manipulation tasks, e.g. resizing cropping. The results of processing an operation against a specific image are guaranteed to be deterministic.
type Params ¶
Params represents a list of pipeline parameters, indexed under their unique name. Parameter values may contain a prefix, which is typically removed when unpacking to a destination structure.
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
A Pipeline represents all data required for converting an image from its original format to the processed result.
func New ¶
New parses the parameter list provided and initializes a Pipeline and supporting list of Operations stored within.
type Resize ¶
type Resize struct { Width int64 `key:"width"` Height int64 `key:"height"` Fit struct { Kind string `key:"fit" default:"clip" valid:"crop"` Crop struct { Gravity string `key:"fit=crop" default:"center" valid:"top|bottom|left|right|point"` Point struct { X int64 `key:"fit=crop:point" index:"0"` Y int64 `key:"fit=crop:point" index:"1"` } } } }
Resize is an operation for manipulating image dimensions, including clipping, cropping and focusing within images.