Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple Picker return error image #681

Open
wonday opened this issue Apr 21, 2018 · 1 comment
Open

Multiple Picker return error image #681

wonday opened this issue Apr 21, 2018 · 1 comment

Comments

@wonday
Copy link

wonday commented Apr 21, 2018

Version

Tell us which versions you are using:

  • react-native-image-crop-picker v0.20.1
  • react-native v0.53.4

Platform

Tell us to which platform this issue is related

  • iOS

Expected behaviour

Select multiple images from iPhone gallery with original size,
if jpeg image exif's orientation is not normal, the returned image file can not show.
But if use single picker, it will OK.

in ImageCropPicker.m

- (void)qb_imagePickerController:(QBImagePickerController *)imagePickerController  didFinishPickingAssets:(NSArray *)assets {
...
                                 if (isLossless && useOriginalWidth && useOriginalHeight) {
                                     // Use original, unmodified image
                                     imageResult.data = imageData;
                                     imageResult.width = @(imgT.size.width);
                                     imageResult.height = @(imgT.size.height);
                                     imageResult.mime = [self determineMimeTypeFromImageData:imageData];
                                     imageResult.image = imgT;
//this block not OK                        
                                 } else {
//this block OK
                                     imageResult = [self.compression compressImage:[imgT fixOrientation] withOptions:self.options];
                                 }
.....

Actual behaviour

Steps to reproduce

        ImageCropPicker.openPicker({
            mediaType: 'photo',
            multiple: true,
            waitAnimationEnd: false,
            maxFiles: 9
        }).then(images => {
            ...
        }

Attachments

the attachment is an image from my iPhone that can not show.
abc.zip

@fubar
Copy link
Contributor

fubar commented Jun 24, 2018

Hi @wonday, can you provide more context? I don't know what you mean by "can not show". This is an image picker library, not one that displays images. I cannot reproduce this issue and the image you attached looks fine. Is it possible that there is an issue with how you are displaying images after the work of the image picker is complete?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants