-
Notifications
You must be signed in to change notification settings - Fork 8
Description
I attempted to compress and upload images, but the process takes longer compared to uploading uncompressed images.
`double fileSizeInMB =
File(filePath).readAsBytesSync().lengthInBytes / (1024 * 1024);
log('Before Compression: ${fileSizeInMB.toStringAsFixed(2)} MB');
Configuration config = const Configuration(jpgQuality: 20);
final param = ImageFileConfiguration(input: input, config: config);
final output = await compressInQueue(param);
final file = File(filePath);
await file.writeAsBytes(output.rawBytes);
double compressedFileSizeInMB =
File(filePath).readAsBytesSync().lengthInBytes / (1024 * 1024);
log('After Compression: ${compressedFileSizeInMB.toStringAsFixed(2)} MB');
`
Help me to figure this out
note : if tried compress(param ) Ui get stucked