utils library
Functions
-
decodePng(
Uint8List bytes) → Future< Image> - Decodes a PNG image from a byte array into an Image object.
-
encodePng(
Image image) → Future< Uint8List> - Encodes an Image object into a PNG format byte array.
-
imgPixelmatch(
Image img1, Image img2, Map< String, dynamic> options) → Future<(double, Uint8List)> - Compares two Image objects and calculates the number of differing pixels.
-
imgToRgba(
Image image) → Future< Uint8List> - Converts an Image object to raw RGBA bytes.
-
readPng(
String path) → Future< Image> - Reads a PNG file from the specified path and converts it to an Image object.
-
resizeImage(
Image image, int width, int height) → Future< Image> - Resizes an Image to the specified dimensions.
-
resizeRawImage(
List< int> rawBytes, int width, int height) → Future<List< int> > - Resizes a raw image byte array to the specified dimensions.
-
rgbaToImg(
Uint8List rawRgba) → Future< Image> - Creates an Image object from raw RGBA bytes.
-
writePng(
String path, Image image) → Future< void> - Writes an Image object to a PNG file at the specified path.