animcodec library
Bounded animated raster encoding and decoding on top of Imcodec.
Classes
- AnimationFrameArea
- Identifies the encoded rectangle from which a complete canvas frame came.
- GifAnimationCodec
-
Reusable
dart:convertcodec for GIF animation sequences. - GifAnimationDecodeOptions
- Resource limits applied before GIF frames are retained.
- GifAnimationDecoder
- Decodes and inspects bounded GIF animation data.
- GifAnimationEncodeOptions
- Settings used to quantize and bound an encoded GIF sequence.
- GifAnimationEncoder
- Encodes complete RGBA frames as GIF89a data.
- GifAnimationInfo
- Header-only information about a GIF sequence.
- GifAnimationStreamEncoder
- Encodes complete RGBA canvas frames one at a time as a GIF89a animation.
- RasterAnimation
- Stores an editable ordered sequence of complete raster frames.
- RasterAnimationFrame
- Stores one fully composited straight-alpha RGBA animation frame.
Enums
- AnimationCodecFailure
- Classifies why an animation could not be read or written.
- AnimationFrameDisposal
- Describes what a container does with a displayed frame before the next one.
Constants
- defaultMaximumAnimationDecodedBytes → const int
- Default aggregate byte budget for decoded frames and working canvases.
- defaultMaximumAnimationEncodedBytes → const int
- Default maximum encoded GIF size accepted by Animcodec.
Functions
-
decodeGifAnimation(
Uint8List bytes, {GifAnimationDecodeOptions options = const GifAnimationDecodeOptions()}) → RasterAnimation - Decodes every GIF image descriptor to a complete composited RGBA canvas.
-
encodeGifAnimation(
RasterAnimation animation, {GifAnimationEncodeOptions options = const GifAnimationEncodeOptions()}) → Uint8List - Encodes complete RGBA canvas frames as a GIF89a animation.
-
inspectGifAnimation(
Uint8List bytes, {GifAnimationDecodeOptions options = const GifAnimationDecodeOptions()}) → GifAnimationInfo - Inspects GIF dimensions, timing and frame count without decoding pixels.
Exceptions / Errors
- AnimationCodecException
- Reports malformed animation data, exceeded limits or unsupported values.