GifDecoder class

A decoder for the GIF image format. This supports both single frame and animated GIF files, and transparency.

Inheritance

Constructors

GifDecoder([List<int> bytes])

Properties

info GifInfo
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

decodeAnimation(List<int> bytes) Animation
Decode all of the frames of an animated gif. For single image gifs, this will return an animation with a single frame.
override
decodeFrame(int frame) Image
Decode a single frame from the data that was set with startDecode. If frame is out of the range of available frames, null is returned. Non animated image files will only have frame 0. An Image is returned, which provides the image, and top-left coordinates of the image, as animated frames may only occupy a subset of the canvas.
override
decodeImage(List<int> bytes, {int frame: 0}) Image
Decode the file and extract a single image from it. If the file is animated, the specified frame will be decoded. If there was a problem decoding the file, null is returned.
override
isValidFile(List<int> bytes) bool
Is the given file a valid Gif image?
override
numFrames() int
How many frames are available to decode? [...]
override
startDecode(List<int> bytes) GifInfo
Validate the file is a Gif image and get information about it. If the file is not a valid Gif image, null is returned.
override
decodeHdrFrame(int frame) HdrImage
Decode a single high dynamic range (HDR) frame from the data that was set with startDecode. If the format of the file does not support HDR images, the regular image will be converted to an HDR image as (color / 255). If frame is out of the range of available frames, null is returned. Non animated image files will only have frame 0. An Image is returned, which provides the image, and top-left coordinates of the image, as animated frames may only occupy a subset of the canvas.
inherited
decodeHdrImage(List<int> bytes, {int frame: 0}) HdrImage
Decode the file and extract a single High Dynamic Range (HDR) image from it. HDR images are stored in floating-poing values. If the format of the file does not support HDR images, the regular image will be converted to an HDR image as (color / 255). If the file is animated, the specified frame will be decoded. If there was a problem decoding the file, null is returned.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

APPLICATION_EXT → const int
0xff
CODE_MASKS → const List<int>
const [0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff]
EXTENSION_RECORD_TYPE → const int
0x21
GIF87_STAMP → const String
'GIF87a'
GIF89_STAMP → const String
'GIF89a'
GRAPHIC_CONTROL_EXT → const int
0xf9
IMAGE_DESC_RECORD_TYPE → const int
0x2c
INTERLACED_JUMP → const List<int>
const [8, 8, 4, 2]
INTERLACED_OFFSET → const List<int>
const [0, 4, 2, 1]
LZ_BITS → const int
12
LZ_MAX_CODE → const int
4095
NO_SUCH_CODE → const int
4098
STAMP_SIZE → const int
6
TERMINATE_RECORD_TYPE → const int
0x3b