decodeImage method

  1. @override
Image? decodeImage(
  1. List<int> bytes, {
  2. int frame = 0,
})
override

Decode a WebP formatted file stored in bytes into an Image. If it's not a valid webp file, null is returned. If the webp file stores animated frames, only the first image will be returned. Use decodeAnimation to decode the full animation.

Implementation

@override
Image? decodeImage(List<int> bytes, {int frame = 0}) {
  startDecode(bytes);
  _info!.frame = 0;
  _info!.numFrames = 1;
  return decodeFrame(frame);
}