compressAndGetFile static method

Future<XFile?> compressAndGetFile(
  1. String path,
  2. String targetPath, {
  3. int minWidth = 1920,
  4. int minHeight = 1080,
  5. int inSampleSize = 1,
  6. int quality = 95,
  7. int rotate = 0,
  8. bool autoCorrectionAngle = true,
  9. CompressFormat format = CompressFormat.jpeg,
  10. bool keepExif = false,
  11. int numberOfRetries = 5,
})

From path to targetPath

Implementation

static Future<XFile?> compressAndGetFile(
  String path,
  String targetPath, {
  int minWidth = 1920,
  int minHeight = 1080,
  int inSampleSize = 1,
  int quality = 95,
  int rotate = 0,
  bool autoCorrectionAngle = true,
  CompressFormat format = CompressFormat.jpeg,
  bool keepExif = false,
  int numberOfRetries = 5,
}) async {
  return _platform.compressAndGetFile(
    path,
    targetPath,
    minWidth: minWidth,
    minHeight: minHeight,
    quality: quality,
    rotate: rotate,
    inSampleSize: inSampleSize,
    autoCorrectionAngle: autoCorrectionAngle,
    format: format,
    keepExif: keepExif,
    numberOfRetries: numberOfRetries,
  );
}