open static method
Implementation
static Future<Image?> open(final String filename,
{final num? heightMm, final num? dpi}) async {
imglib.Image? decodeImg = await imglib.decodePngFile(filename);
if (decodeImg != null) {
final argbPixels = _getArgbPixels(decodeImg);
if (heightMm != null && dpi != null) {
decodeImg = _resizeHeightMax(decodeImg, heightMm, dpi);
}
return Image(argbPixels, decodeImg.width, decodeImg.height);
}
return null;
}