Hello,
I am testing iNatNext with a Samsung A13. I’m using the last github release (1.0.27).
If I take a photo in portrait orientation with iNat camera, the photo shows up correctly after. However, if I upload the same photo from my phone’s gallery, the photo is uploaded with a landscape orientation.
I believe this has to do with the code in PhotosSection.tsx (checkImageOrientation, l. 75) which determine whether photos are portrait or landcape mode dependig on the width and height of the image. However, when saved in the gallery, Samsung photos are always landscape (width > height) and have an orientation tag indicating whether the photo should be rotated or not.
Not sure this is the same problem. This is for the “old” iNat app while my problem is for the New React iNatNext. In my case, only images in portrait mode are sideways. Images in landscape mode are not.
I think that this has to do because the new app does not look at the EXIF orientation tag, but only the width and height of images.
@tiwane, on your pixel 8, when you take an image in portrait mode, could you check whether there is an orientation tag and if the width < height ?
I think the orientation exif tag can be accessed from iNaturalistReactNative/src/sharedHelpers/parseExif.ts. I will try to see what I can do next week, I don’t have the developers tools installed on my computer and have a very limited connexion at the moment.
Thanks! One of our mobile devs has this model as well and can replicate and we’ll look into a fix. Looks like it might just affect Samsung’s A series, but hard to know for sure yet.
Great. I had a deeper look into the code and although I could probably provide a fix, il will probably take me a lot of time as the project is quite complex. So if this developer can provide a fix, it will be great. Thank you for looking into this.