processImage function
Implementation
Future<ImageElement?> processImage(Uint8List? bytes, String? url, bool flipY) async{
Image? image = bytes == null? null:decodeImage(bytes);
if(image != null && flipY) {
image = flipVertical(image);
}
image = image?.convert(format:Format.uint8,numChannels: 4);
return image != null?ImageElement(
url: url,
src: url,
data: Uint8Array.fromList(image.getBytes()),
width: image.width,
height: image.height
):null;
}