ivpusic / react-native-image-crop-picker

iOS/Android image picker with support for camera, video, configurable compression, multiple images and cropping
MIT License
6.14k stars 1.56k forks source link

Gif files are returned as jpeg #1113

Open fega opened 5 years ago

fega commented 5 years ago

Version

Tell us which versions you are using:

Platform

IOS

Expected behaviour

I'd expect as mentioned in previous comments that if I set compressImageQuality as undefined it will return original image but it doesn't work (I tried also with values like 1, 100 and null, but i'm getting the same)

Actual behaviour

image is a JPEG

Steps to reproduce

const options= {}
ImagePicker.openPicker(options).then(response => {
        console.log('MIME TYPE= ', response.mime)
});

Attachments

// stacktrace or any other useful debug info

Love react-native-image-crop-picker? Please consider supporting our collective: 👉 https://opencollective.com/react-native-image-crop-picker/donate

brandonpearcy commented 4 years ago

I can also confirm this is happening. If a user selects an animated GIF, the result is a static JPEG instead.

Adarwall commented 4 years ago

Did you find a solution? I'm facing the same issue...

brunowbbs commented 4 years ago

Did you find a solution?

STIENLILLY commented 4 years ago

https://github.com/ivpusic/react-native-image-crop-picker/blob/da9af08384c35dcd3be154cdb6d5c579b48b338a/ios/src/ImageCropPicker.m#L828-L841

'filePath' is forced to jpg extension that is created by the 'writeTempFile' option.

STIENLILLY commented 4 years ago

https://github.com/ivpusic/react-native-image-crop-picker/pull/1301 Check for my PR.

omarinho commented 4 years ago

Apparently the same is happening with .BPM extension,

STIENLILLY commented 4 years ago

@omarinho .bpm is not support to extension but you can customize persistFile function to support bpm

lucasftcruz commented 4 years ago

I saw that a fix was merged here #1301 . Any plans on publishing this fix on v.0.25.3 for RN 0.60? It would be a saviour for us!

LeonelRiera commented 2 months ago

Any news with this fix? It seems correct but why has it not been merged after years? .gif is still not working and it is still returning a .jpg