immich icon indicating copy to clipboard operation
immich copied to clipboard

[BUG] Incorrect Exif & Orientation for DNG's

Open Cotywio opened this issue 3 years ago • 4 comments

Describe the bug DNG's from Google Pixel 6 Pro show the incorrect dimensions, orient incorrectly.

To Reproduce Steps to reproduce the behavior:

  1. Upload DNG from Pixel 6 Pro
  2. Click thumbnail to open up picture
  3. Picture rotates to the left
  4. Details show 512 x 680

Screenshots

JPG DNG

System

  • Phone OS [iOS, Android]: Android 13
  • Server Version: 1.26.0
  • Mobile App Version: 1.26.0 build.36

Additional context When viewing the images from the Android app they are flipped, however when viewing from a browser or via the iOS app they are shown in the correct orientation.

I've included the JPG/DNG and docker-compose/.env in the zip below: PXL_20220411_005152876.zip

Cotywio avatar Aug 28 '22 15:08 Cotywio

Hi @Cotywio, correct picture rotation is an immich feature.

panoti avatar Aug 28 '22 17:08 panoti

Not sure what is wrong with the .dng file but here is what I see when open the file in image viewer on PopOS! (Ubuntu derivative)

image

So the file resolution is correctly extracted from the App standpoint.

We fixed the issue with the orientation in #547

alextran1502 avatar Aug 28 '22 20:08 alextran1502

Hey @alextran1502, awesome! Glad to hear about the orientation. And agreed its very strange. When I open it in Windows I get the same, but using exif tool 12.44 I get a different result. (as well as in Google Photos and iOS Photos)

WindowsDNG

Cotywio avatar Aug 28 '22 20:08 Cotywio

After small insight, I found that the problem come from our libraries exifr and sharp. I have also tried on 2 other libs (exiftool and exiv2) and both gave good results. I think this issue may be fixed with https://github.com/immich-app/immich/issues/232 once we have selected the appropriate library for reading and writing exif data.

panoti avatar Aug 29 '22 09:08 panoti

Please check again if the issue still persists as we have moved to exiftool. @Cotywio

samip5 avatar Jan 22 '23 08:01 samip5

Fixed! Thank you for your great work!

Cotywio avatar Feb 01 '23 12:02 Cotywio