Documentation
¶
Overview ¶
apng is Animated PNG (APNG) encoder
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func APNGBytes ¶ added in v1.0.1
APNGBytes encodes a slice of images into an APNG byte stream with a consistent delay per frame.
Images obtained via image.SubImage() are not supported, If an image is a sub-image, copy it into a new image before encoding.
The successive delay times, one per frame, in 100ths of a second (centiseconds).
func EncodeAll ¶
EncodeAll encodes the entire APNG struct to the io.Writer, validating input constraints.
Images obtained via SubImage() are not supported, If an image is a sub-image, copy it into a new image before encoding.
func Save ¶ added in v1.0.1
Save writes an APNG file with the given images and uniform frame delay.
Images obtained via image.SubImage() are not supported, If an image is a sub-image, copy it into a new image before encoding.
The successive delay times, one per frame, in 100ths of a second (centiseconds).
Types ¶
type APNG ¶
type APNG struct {
// The successive images.
//
// Images obtained via SubImage() are not supported, If an image is a sub-image, copy it into a new image before encoding.
Images []image.Image
// The successive delay times, one per frame, in 100ths of a second (centiseconds).
Delays []uint16
Disposals []byte // The successive disposal methods, one per frame.
LoopCount uint32 // The loop count. 0 indicates infinite looping.
Config image.Config
}
APNG encapsulates animated PNG frames, their delays, disposal methods, loop count, and global configuration.