GrapheneOS / Camera

Modern camera app focused on privacy and security with QR & barcode scanning.
https://grapheneos.org/
MIT License
826 stars 87 forks source link

Images are saved the wrong orientation when the option "Save image as previewed" is enabled when using front camera #378

Open ExchangeREC opened 11 months ago

ExchangeREC commented 11 months ago

Hello everyone,

I've noticed a bug within the Camera app of GrapheneOS:

When you use the front camera and enable the option "Save image as previewed", the picture is saved in the wrong orientation (it is rotated to the side).

I also used different Gallery apps but the issue remains. It is NOT the case when clicking on the picture preview within the camera app itself, which is pretty strange somehow.

To reproduce:

empratyush commented 10 months ago

Unable to reproduce. most likely problem is gallery app have you tried google photos app or built-in gallery?

ExchangeREC commented 10 months ago

Unable to reproduce. most likely problem is gallery app have you tried google photos app or built-in gallery?

Hello,

that's kinda weird. I will take some screenshots today to show you further.

I tried different gallery apps as well as built in gallery app - it's the same issue..

EDIT: With "Google Photos", the issue is not present! But anyways, it's really strange that any other gallery app has this problem but only if this specific option (Save image as previewed) is enabled.

I don't want to trust the Google Photos app at all to be honest.

empratyush commented 10 months ago

Alright so the problem is gallery app or more specifically how "Save image as previewed" feature works. This feature doesn't actually save image as previewed but rather adds metadata about how image is supposed to be previewed google photos app handles this metadata correctly.

Will look into it, Although I don't think can we do anything about it gallery app needs to handle metadata correctly.

I tried different gallery apps as well as built in gallery app - it's the same issue..

I mean build-in gallery in the camera app NOT the bundled gallery app (i am sorry for not being specific the first time) .

empratyush commented 10 months ago

I tested few gallery app they don't support ExifInterface.ORIENTATION_FLIP_HORIZONTAL ExifInterface.ORIENTATION_FLIP_HORIZONTAL etc.

ExchangeREC commented 10 months ago

Alright so the problem is gallery app or more specifically how "Save image as previewed" feature works. This feature doesn't actually save image as previewed but rather adds metadata about how image is supposed to be previewed google photos app handles this metadata correctly.

Will look into it, Although I don't think can we do anything about it gallery app needs to handle metadata correctly.

I tried different gallery apps as well as built in gallery app - it's the same issue..

I mean build-in gallery in the camera app NOT the bundled gallery app (i am sorry for not being specific the first time) .

Thank you so much! That clearifies my questions completely. So it's not about the Camera app but about the Gallery "interpreting" the pictures, right?

Is there maybe any solution to make it possible for other gallery apps to "understand the metadata better" or interpret it at all?

I tested few gallery app they don't support ExifInterface.ORIENTATION_FLIP_HORIZONTAL ExifInterface.ORIENTATION_FLIP_HORIZONTAL etc.

But how is it done for usual Camera and Gallery apps? Is it simply saved the right orientation?

Thank you very much sir!