WebPDecoder class
Decode a WebP formatted image. This supports lossless (vp8l), lossy (vp8), lossy+alpha, and animated WebP images.
Constructors
-
WebPDecoder([List<
int> ? bytes])
Properties
- format → ImageFormat
-
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- info → WebPInfo?
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
decode(
List< int> bytes, {int? frame}) → Image? -
Decode a WebP formatted file stored in
bytes
into an Image. If it's not a valid webp file, null is 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(
List< int> bytes) → bool -
Is the given file a valid WebP 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(
List< int> bytes) → WebPInfo? -
Validate the file is a WebP image and get information about it.
If the file is not a valid WebP image, null is returned.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited