encodeJpg method
- required int quality,
Encodes this image as a JPG with the given quality.
Implementation
Uint8List? encodeJpg({required int quality}) {
final params = VecI32.fromList([IMWRITE_JPEG_QUALITY, quality]);
final (success, frame) = imencode(".jpg", this, params: params);
return success ? frame : null;
}