GifDecoder class
A decoder for the GIF image format. This supports both single frame and animated GIF files, and transparency.
Constructors
- GifDecoder([Uint8List? bytes])
Properties
Methods
-
decode(
Uint8List bytes, {int? frame}) → Image? -
Decode the file and extract a single image from it. If the file is
animated, and
frame
is specified, that particular frame will be decoded. Otherwise if the image is animated andframe
is null, the returned Image will include all frames. If there was a problem decoding the Image, null will be returned.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 haveframe
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 -
isValidFile(
Uint8List bytes) → bool -
Is the given file a valid Gif image?
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
numFrames(
) → int -
How many frames are available to decode?
override
-
startDecode(
Uint8List 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
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- applicationExt → const int
-
codeMasks
→ const List<
int> - extensionRecordType → const int
- gif87Stamp → const String
- gif89Stamp → const String
- graphicControlExt → const int
- imageDescRecordType → const int
-
interlacedJump
→ const List<
int> -
interlacedOffset
→ const List<
int> - lzBits → const int
- lzMaxCode → const int
- noSuchCode → const int
- stampSize → const int
- terminateRecordType → const int