IcoDecoder class

Decodes an ICO formatted Image. Note that ICO files are always decoded to rgba8 32-bit Images in order to support how they encode transparency.

Inheritance

Constructors

IcoDecoder()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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 and frame 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 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
decodeImageLargest(Uint8List bytes) Image?
decodes the largest frame.
isValidFile(Uint8List bytes) bool
A light-weight function to test if the given file is able to be decoded by this Decoder.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
numFrames() int
How many frames are available to be decoded. startDecode should have been called first. Non animated image files will have a single frame.
override
startDecode(Uint8List bytes) DecodeInfo?
Start decoding the data as an animation sequence, but don't actually process the frames until they are requested with decodeFrame.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited