Skip to content

performance issue #8

@Aruljebaraj

Description

@Aruljebaraj

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions