omrImageOf function
Converts a decoded image to an RGBA OmrImage for recognition.
Implementation
OmrImage omrImageOf(img.Image image) {
final rgba = image.convert(numChannels: 4);
return OmrImage(
Uint8List.fromList(rgba.getBytes(order: img.ChannelOrder.rgba)),
width: image.width,
height: image.height,
channels: 4,
);
}