decodeNamedImage function
Identify the format of the image using the file extension of the given
name
, and decode the given file bytes
to a single frame Image. See
also decodeImage.
Implementation
Image? decodeNamedImage(List<int> bytes, String name) {
final decoder = getDecoderForNamedImage(name);
if (decoder == null) {
return null;
}
return decoder.decodeImage(bytes);
}