toJpeg method
Converts the image to a JpegImage, helping when one wants to display it or make JPEG treatment on it.
Implementation
Future<JpegImage> toJpeg({
int quality = 100,
}) async {
final jpegQuality = quality.clamp(0, 100);
final wrappedImage = await AnalysisImageUtils().nv21toJpeg(
wrapped(),
jpegQuality,
);
return wrappedImage.unwrap() as JpegImage;
}