shijingsh / react-native-customized-image-picker

iOS/Android image picker with support for camera, video compression, multiple images and cropping
245 stars 59 forks source link

[IOS] Image picked from gallery is very poor quality. #29

Closed ducpt2 closed 6 years ago

ducpt2 commented 6 years ago

This is my setting on IOS: multiple: true, maxFiles: 100, maxSize: 100, loadingLabelText: "Đang xử lí ảnh...", smartAlbums: ["UserLibrary"], mediaType: "photo", isCamera: true, multipleShot: true

this is response: data:null mime:image/jpeg width:150 height:200 localIdentifier:6020B52E-AD16-4421-8435-9ACA2FC92C55/L0/001 size:33012 filename:IMG_2920.JPG path:/private/var/mobile/Containers/Data/Application/87206DE1-5A2E-45BB-A9F0- 2C198673CA7A/tmp/react-native-customized-image-picker/2B824746-739C-436E-A495-93EB667DF30D.jpg exif:null sourceURL:file:///var/mobile/Media/DCIM/102APPLE/IMG_2920.JPG

Have a nice day, thank you @liukefu2050 :) big fan.

ducpt2 commented 6 years ago

I found the solution is set width and height to ImagePicker. Like this: ImageCropPicker.openPicker({ width: 1080, height: 1920}). Thanks.

ducpt2 commented 6 years ago

Sorry when i reopen the issue, the solution above is a temporary solution. How can i get the original size and quality of image [iOS]. I try to using react-native-image-crop-picker for iOS, but it is the same. Can you help? It is big problem.

liukefu2050 commented 6 years ago

Without the use of width and height parameters, the size of the original picture will be used

ducpt2 commented 6 years ago

@liukefu2050, sorry but ...it not, it always return like this: this is my setting on IOS (not using width, height):

this is reponse: data:null mime:image/jpeg width:150 height:200 localIdentifier:6020B52E-AD16-4421-8435-9ACA2FC92C55/L0/001 size:33012 filename:IMG_2920.JPG path:/private/var/mobile/Containers/Data/Application/87206DE1-5A2E-45BB-A9F0- 2C198673CA7A/tmp/react-native-customized-image-picker/2B824746-739C-436E-A495-93EB667DF30D.jpg exif:null sourceURL:file:///var/mobile/Media/DCIM/102APPLE/IMG_2920.JPG

I try to using react-native-image-crop-picker, but the result is the same. May i do something wrong?

liukefu2050 commented 6 years ago

fixed it ,it's bug.The default is 200 x 200. now without the use of width and height parameters, the size of the original picture will be used

ducpt2 commented 6 years ago

@liukefu2050 Thank you so much. :) 👍
Sorry, how can i update new version to fix this problem?

ducpt2 commented 6 years ago

@liukefu2050 OK i found the solution.