gif

package
v0.0.0-...-60e87b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2016 License: MIT Imports: 8 Imported by: 0

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.

func (*Encoder) Change

func (enc *Encoder) Change(params imageserver.Params) bool

Change implements Encoder.

func (*Encoder) Encode

func (enc *Encoder) Encode(w io.Writer, nim image.Image, params imageserver.Params) error

Encode implements Encoder.

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

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

type ProcessorFunc func(*gif.GIF, imageserver.Params) (*gif.GIF, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL