flutter_image_cropper icon indicating copy to clipboard operation
flutter_image_cropper copied to clipboard

Compression is skipped

Open sm2017 opened this issue 5 years ago • 7 comments

I understand that when no corp is needed , Compression is skipped For example , We have a 1:1 image (720x720) and in crop page , We don't edit image , the Compression is skipped and we get original image

I only tested in android

sm2017 avatar May 09 '20 13:05 sm2017

@hnvn Take a look please

sm2017 avatar May 27 '20 05:05 sm2017

@hnvn Reply please

sm2017 avatar Jul 13 '20 05:07 sm2017

On Android side, the native library takes care both of cropping and compression image, so I am not sure about your question. On iOS side, my codes handle it and the compression apply for the result image if it is JPG image. Here's Objective-C codes: https://github.com/hnvn/flutter_image_cropper/blob/master/ios/Classes/ImageCropperPlugin.m#L206

hnvn avatar Jul 13 '20 06:07 hnvn

@hnvn Please try yourself, to reproduce follow these steps

1- Select a large 1:1 image (More than 500KB) 2- In crop page dont edit image, just approve 3- Result is original image and not compressed 4- Pick image again 5- Crop a little of image 6- Result compressed and you have a less than 100KB image

sm2017 avatar Jul 14 '20 06:07 sm2017

If it happens on Android, you'd better to discuss it on the native library repos. The plugin codes only grab parameters from Dart codes and pass them to native codes through a PlatformChannel.

hnvn avatar Jul 14 '20 06:07 hnvn

@hnvn it's happens on iOS too!

sm2017 avatar Jul 04 '21 12:07 sm2017

any fix or workaround on this?

sandysultan avatar Sep 02 '21 10:09 sandysultan