brighten method

Future<Image> brighten(
  1. double amount, {
  2. bool reversePremultipliedAlpha = false,
})

Change each pixel's color to be brighter and return a new Image.

The amount is a double value between 0 and 1.

Implementation

Future<Image> brighten(
  double amount, {
  bool reversePremultipliedAlpha = false,
}) async {
  assert(amount >= 0 && amount <= 1);

  return transformPixels(
    (color) => color.brighten(amount),
    reversePremultipliedAlpha: reversePremultipliedAlpha,
  );
}