removeImageAlpha static method

Image removeImageAlpha(
  1. Uint8List imageBytes
)

去除圖片的alpha通道

Implementation

static Image removeImageAlpha(Uint8List imageBytes) {
  // Load the image
  final image = decodeImage(imageBytes);
  if (image == null) {
    print('Failed to load image.');
    throw Exception('Failed to load image.');
  }

  return _removeImageAlpha(image);
}