decode method
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.
Implementation
@override
Image? decode(Uint8List bytes, {int? frame}) {
if (startDecode(bytes) == null) {
return null;
}
return decodeFrame(frame ?? 0);
}