Documentation ¶
Overview ¶
Package gift provides imageserver/image.Processor implementations for GIFT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResizeProcessor ¶
type ResizeProcessor struct { DefaultResampling gift.Resampling MaxWidth int MaxHeight int }
ResizeProcessor is a imageserver/image.Processor implementation that resizes the Image with GIFT.
All params are extracted from the "gift_resize" node param and are optionals:
- width
- height
- mode: resize mode possible values:
- <no value> (default): see github.com/disintegration/gift.Resize
- fit: see github.com/disintegration/gift.ResizeToFit
- fill: see github.com/disintegration/gift.ResizeToFill
- resampling: resampling method possible values:
- nearest_neighbor (default)
- box
- linear
- cubic
- lanczos
func (*ResizeProcessor) Change ¶
func (prc *ResizeProcessor) Change(params imageserver.Params) bool
Change implements imageserver/image.Processor.
func (*ResizeProcessor) Process ¶
func (prc *ResizeProcessor) Process(nim image.Image, params imageserver.Params) (image.Image, error)
Process implements imageserver/image.Processor.
type RotateProcessor ¶
type RotateProcessor struct {
DefaultInterpolation gift.Interpolation
}
RotateProcessor is a imageserver/image.Processor implementation that rotates the Image with GIFT.
func (*RotateProcessor) Change ¶
func (prc *RotateProcessor) Change(params imageserver.Params) bool
Change implements imageserver/image.Processor.
func (*RotateProcessor) Process ¶
func (prc *RotateProcessor) Process(nim image.Image, params imageserver.Params) (image.Image, error)
Process implements imageserver/image.Processor.
Click to show internal directories.
Click to hide internal directories.