I am facing an issue where the size of the picked image in the app is significantly smaller than the original image in the phone's gallery.
Original image 14.5 MB
but after picking it, its 324 KB
without any quality setting.
Here are the relevant code snippets:
// image_picker: ^0.8.7+1
// https://pub.dev/packages/image_picker
final imagePicker = ImagePicker();
final pickedImage = await imagePicker.pickImage(source: ImageSource.gallery);
if (pickedImage != null) {
final originalImage = File(pickedImage.path);
final imageSize = originalImage.lengthSync();
setState(() {
_image = originalImage;
_imageSize = imageSize;
_imageWidth = image.width;
_imageHeight = image.height;
});
}
Could anyone please help me understand why and how its happening and how to pick images with original size?