utils library
Functions
-
decodePng(
Uint8List bytes) → Future -
Decodes a PNG image from a byte array into an
Imageobject. -
encodePng(
dynamic image) → Future< Uint8List> -
Encodes an
Imageobject into a PNG format byte array. -
imgPixelmatch(
dynamic img1, dynamic img2, Map< String, dynamic> options) → Future<(double, Uint8List)> -
Compares two
Imageobjects and calculates the number of differing pixels. -
imgToRgba(
dynamic image) → Future< Uint8List> -
Converts an
Imageobject to raw RGBA bytes. -
readPng(
String path) → Future -
Reads a PNG file from the specified path and converts it to an
Imageobject. -
resizeImage(
dynamic image, int width, int height) → Future -
Resizes an
Imageto 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 -
Creates an
Imageobject from raw RGBA bytes. -
writePng(
String path, dynamic image) → Future< void> -
Writes an
Imageobject to a PNG file at the specified path.