decodeImage function

Image? decodeImage(
  1. Uint8List data, {
  2. int? frame,
})

Decode the given image file bytes by first identifying the format of the file and using that decoder to decode the file into a single frame Image. WARNING Since this will check the image data against all known decoders, it is much slower than using an explicit decoder.

Implementation

Image? decodeImage(Uint8List data, {int? frame}) {
  final decoder = findDecoderForData(data);
  return decoder?.decode(data, frame: frame);
}