removeAlpha method

void removeAlpha()

Remove alpha channel from the image

Implementation

void removeAlpha() {
  if (!hasAlpha) {
    return;
  }

  image.backgroundColor = ColorUint8.rgb(255, 255, 255);
  image = image.convert(
    numChannels: 3,
  );
}