decode method

  1. @override
Image? decode(
  1. Uint8List data, {
  2. int? frame,
})
override

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.

Implementation

@override
Image? decode(Uint8List data, {int? frame}) {
  if (startDecode(data) == null) {
    return null;
  }
  return decodeFrame(frame ?? 0);
}