Documentation
¶
Overview ¶
Package gif provides a GIF Encoder, Handler, and Processor.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encoder ¶
type Encoder struct{}
Encoder encodes an Image to GIF.
type FallbackHandler ¶
type FallbackHandler struct { *Handler Fallback imageserver.Handler }
FallbackHandler is an Image Handler that allows to switch between a Handler of this package, or a fallback Handler.
If the Image format and the "format" param are equal to "gif", the Handler of this package is used. Otherwise, the fallback Handler is used.
func (*FallbackHandler) Handle ¶
func (hdr *FallbackHandler) Handle(im *imageserver.Image, params imageserver.Params) (*imageserver.Image, error)
Handle implements Handler.
type Handler ¶
type Handler struct {
Processor Processor
}
Handler is a GIF image Handler.
func (*Handler) Handle ¶
func (hdr *Handler) Handle(im *imageserver.Image, params imageserver.Params) (*imageserver.Image, error)
Handle implements Handler.
type Processor ¶
type Processor interface { Process(*gif.GIF, imageserver.Params) (*gif.GIF, error) imageserver_image.Changer }
Processor represents a GIF processor.
type ProcessorFunc ¶
ProcessorFunc is a Processor func.
func (ProcessorFunc) Change ¶
func (f ProcessorFunc) Change(params imageserver.Params) bool
Change implements Processor.
func (ProcessorFunc) Process ¶
func (f ProcessorFunc) Process(g *gif.GIF, params imageserver.Params) (*gif.GIF, error)
Process implements Processor.
type SimpleProcessor ¶
type SimpleProcessor struct {
imageserver_image.Processor
}
SimpleProcessor is a GIF Processor that processes each frames with the sub Processor.
func (*SimpleProcessor) Process ¶
func (prc *SimpleProcessor) Process(g *gif.GIF, params imageserver.Params) (*gif.GIF, error)
Process implements Processor.