read static method

Future<Pixels> read(
  1. String path, {
  2. int? width,
  3. int? height,
})

The image file at path, its pixels — scaled to width × height when given. Throws when it can't be read as an image.

Implementation

static Future<Pixels> read(String path, {int? width, int? height}) async =>
    decode(await File(path).readAsBytes(), width: width, height: height);