NativeTerminalImage.fromRealImage constructor
NativeTerminalImage.fromRealImage({
- required Image image,
- Color? backgroundColor,
Creates a terminal image from an existing image object.
image is the source image
backgroundColor is used for transparent pixels
Implementation
NativeTerminalImage.fromRealImage({
required img.Image image,
Color? backgroundColor,
}) : _data = List.generate(
image.height * image.width,
(i) => _getPixelFromNative(i, image, backgroundColor),
),
_size = Size(image.width, image.height);