Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fit ¶
Fit scales a image to fit to the specified maximum width and height using a linear filter, the image aspect ratio is preserved. If the image already fits inside the bounds, nothing will be done.
type FitFactory ¶
type FitFactory struct{}
FitFactory creates Fit instances.
func (FitFactory) Name ¶
func (ff FitFactory) Name() string
Name returns the name of the filter, which is also the directive used in the image filter block.
func (FitFactory) New ¶
func (ff FitFactory) New(args ...string) (imagefilter.Filter, error)
New initialises and returns a configured Fit instance.
Syntax:
fit <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.
func (FitFactory) Unmarshal ¶
func (ff FitFactory) Unmarshal(data []byte) (imagefilter.Filter, error)
Unmarshal decodes JSON data and returns a Fit instance.
Click to show internal directories.
Click to hide internal directories.