-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.
Description
When reencoding images with a maxWidth and maxHeight set, the picker plugin currently uses 100% for the JPEG quality level:
- (always passed
quality:nilAFAICT) https://github.com/flutter/plugins/blob/master/packages/image_picker/ios/Classes/FLTImagePickerMetaDataUtil.m#L79 - https://github.com/flutter/plugins/blob/master/packages/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImageResizer.java#L90
100% quality does not mean lossless compression, however; chroma subsampling and DCT coefficient rounding still occurs, so compression artifacts are still going to be introduced.
However, if the user wants to increase the compression level they then have to re-encode again which introduces yet more artifacting, besides being inefficient for multiple reasons.
This should be a good introductory issue for someone wanting to learn about the Flutter native bridge although it would touch both Android and iOS code.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
c: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityp: image_pickerThe Image Picker plugin.The Image Picker plugin.packageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.