react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

Fix: rotation on some android devices

Open MrLibya opened this issue 1 year ago • 6 comments

Error

On some android devices the photo is rotated

Solution

This caused by lack of some exif rotation is not read on creating the new bitmap for rotation.

MrLibya avatar Apr 03 '24 16:04 MrLibya

@taboulot

MrLibya avatar Apr 03 '24 16:04 MrLibya

Hi @MrLibya do you a device example on which it does not work ?

gh-clement-taboulot avatar Apr 24 '24 09:04 gh-clement-taboulot

@MrLibya

I think I finally understand the problem. I've detailed it in this issue #402. Unfortunately your PR does not fix the problem (on both iOS & Android) has it does not take into account the flip operation.

With your fix if the image has an exif orientation value = 4 : image

I think we will have this result: image

Instead of this one: image

gh-clement-taboulot avatar Apr 30 '24 14:04 gh-clement-taboulot

Sorry for not providing example code I was busy, I'll look into that and see what I can do

MrLibya avatar Apr 30 '24 14:04 MrLibya

@taboulot I've added handing for mirrored ( flipped ) image exif, I've used those images to test on https://github.com/recurser/exif-orientation-examples

Code test: https://gist.github.com/MrLibya/cabea9cbbb776cc5e77bf1a56df2d8d2

MrLibya avatar May 01 '24 10:05 MrLibya

i need this!!

felansu avatar May 12 '24 14:05 felansu

@taboulot anything else needed?

MrLibya avatar May 27 '24 14:05 MrLibya

@MrLibya

I left 2 comments. I'm on vacation, and I'm going to stay that way for a while. My response times are therefore variable, but I will remain available for the next few days.

gh-clement-taboulot avatar May 30 '24 05:05 gh-clement-taboulot

@taboulot Done ✅

MrLibya avatar May 30 '24 10:05 MrLibya

@MrLibya

Perfect 👌 I will release it in few minutes

gh-clement-taboulot avatar May 30 '24 10:05 gh-clement-taboulot