import 'dart:typed_data';
import 'package:flutter_image_compress/flutter_image_compress.dart';

/// 压缩图片
/// [jpegBytes] 图片字节
/// [quality] 压缩质量 0-100
Future<Uint8List> compressImage(
    Uint8List jpegBytes, int quality, int minSize) async {
  var result = await FlutterImageCompress.compressWithList(
    jpegBytes,
    minHeight: minSize,
    minWidth: minSize,
    quality: quality,
    rotate: 0,
  );
  return result;
}
