decodeNamedImage function

Image? decodeNamedImage(
  1. String path,
  2. Uint8List data, {
  3. int? frame,
})

Decodes the given image file bytes, using the filename extension to determine the decoder.

Implementation

Image? decodeNamedImage(String path, Uint8List data, {int? frame}) {
  final decoder = findDecoderForNamedImage(path);
  if (decoder != null) {
    return decoder.decode(data, frame: frame);
  }
  return decodeImage(data, frame: frame);
}