decodeNamedImage function
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);
}