Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resize ¶
type Resize struct { Width string `json:"width,omitempty"` Height string `json:"height,omitempty"` }
Resize can downsize images. If upsizing of an image is detected, nothing will be done and the input image is returned unchanged.
type ResizeFactory ¶
type ResizeFactory struct{}
ResizeFactory creates Resize instances.
func (ResizeFactory) Name ¶
func (ff ResizeFactory) Name() string
Name returns the name of the filter, which is also the directive used in the image filter block.
func (ResizeFactory) New ¶
func (ff ResizeFactory) New(args ...string) (imagefilter.Filter, error)
New initialises and returns a ResizeFilter instance.
Syntax:
resize <width> <height>
Parameters:
width must be a positive integer and determines the maximum width.
height must be a positive integer and determines the maximum height.
Either width or height can be 0, then the image aspect ratio is preserved.
func (ResizeFactory) Unmarshal ¶
func (ff ResizeFactory) Unmarshal(data []byte) (imagefilter.Filter, error)
Unmarshal decodes JSON data and returns a Resize instance.
Click to show internal directories.
Click to hide internal directories.