compressToJpg function

Future<Uint8List> compressToJpg(
  1. Uint8List bytes
)

Implementation

Future<Uint8List> compressToJpg(Uint8List bytes ) async {
  final image = ImageFile(filePath: '', rawBytes: bytes);
  final param = ImageFileConfiguration(input: image);
 return ( await compressor.compress(param)).rawBytes;
}