ImageExtension extension

on

Properties

size Vector2
Returns a Vector2 representing the dimensions of this image.
no setter

Methods

brighten(double amount) Future<Image>
Change each pixel's color to be brighter and return a new Image.
darken(double amount) Future<Image>
Change each pixel's color to be darker and return a new Image.
getBoundingRect() Rect
Returns the bounding Rect of the image.
pixelsInUint8() Future<Uint8List>
Helper method to retrieve the pixel data of the image as a Uint8List.
resize(Vector2 newSize) Future<Image>
Resizes this image to the given newSize.

Static Methods

fromPixels(Uint8List pixels, int width, int height) Future<Image>
Converts a raw list of pixel values into an Image object.