Image.fromImageLibrary constructor

Image.fromImageLibrary(
  1. Image image, {
  2. num? heightMm,
  3. num? dpi,
})

Implementation

factory Image.fromImageLibrary(final imglib.Image image,
    {final num? heightMm, final num? dpi}) {
  var img = image;
  if (heightMm != null && dpi != null) {
    img = _resizeHeightMax(image, heightMm, dpi);
  }
  final argbPixels = _getArgbPixels(img);
  return Image(argbPixels, img.width, img.height);
}