Documentation ¶
Overview ¶
Package apng implements an APNG image decoder.
The PNG specification is at https://www.w3.org/TR/PNG/. The APNG specification is at https://wiki.mozilla.org/APNG_Specification
Index ¶
Constants ¶
View Source
const ( DISPOSE_OP_NONE = 0 DISPOSE_OP_BACKGROUND = 1 DISPOSE_OP_PREVIOUS = 2 )
dispose_op values, as per the APNG spec.
View Source
const ( BLEND_OP_SOURCE = 0 BLEND_OP_OVER = 1 )
blend_op values, as per the APNG spec.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type APNG ¶
type APNG struct { Frames []Frame // LoopCount defines the number of times an animation will be // restarted during display. // A LoopCount of 0 means to loop forever LoopCount uint }
type FormatError ¶
type FormatError string
A FormatError reports that the input is not a valid PNG.
func (FormatError) Error ¶
func (e FormatError) Error() string
type Frame ¶
type Frame struct {
XOffset, YOffset int
DelayNumerator uint16
DelayDenominator uint16
DelayTime float32
DisposeOp byte
BlendOp byte
// IsDefault indicates if the Frame is a default image that
// should not be used in the animation. IsDefault can only
// be true on the first frame.
IsDefault bool
// contains filtered or unexported fields
}
type FrameHookArgs ¶ added in v0.0.2
type UnsupportedError ¶
type UnsupportedError string
An UnsupportedError reports that the input uses a valid but unimplemented PNG feature.
func (UnsupportedError) Error ¶
func (e UnsupportedError) Error() string
Click to show internal directories.
Click to hide internal directories.