Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAnimationComplete signifies that the animation should not continue. ErrAnimationComplete = errors.New("Animation is complete") // ErrNotAnimated signifies that the animation cannot be created, possibly // due one or less available animation frames. ErrNotAnimated = errors.New("GIF isn't animated") )
Functions ¶
Types ¶
type Frame ¶ added in v0.4.5
Frame is a helper struct to group together GIF frame info, which is stored in 3 separate slices by the standard library.
type Helper ¶
type Helper struct { // Frames is the group of frames composing the GIF. Frames []Frame // contains filtered or unexported fields }
Helper simplifies interacting with an animated GIF.
func HelperFromReader ¶
HelperFromReader cretes a new GIF helper from a Reader.
func (*Helper) At ¶ added in v0.4.2
At returns the color of the pixel at (x, y) at the current state of the animation. In other words, the pixel that results from layering all GIF frames up to the current frame on top of each other.
func (*Helper) Bounds ¶ added in v0.4.2
Bounds returns the bounds of the background/first frame of the GIF.
func (*Helper) ColorModel ¶ added in v0.4.2
ColorModel returns the color model of the image representing the current state of the animation.
func (*Helper) CurrentImage ¶ added in v0.4.2
CurrentImage is the image representing the current state of the animation.
Click to show internal directories.
Click to hide internal directories.