[BUG] Incorrect Exif & Orientation for DNG's #232

Closed
opened 2026-02-04 18:54:18 +03:00 by OVERLORD · 6 comments
Owner

Originally created by @Cotywio on GitHub (Aug 28, 2022).

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

Originally created by @Cotywio on GitHub (Aug 28, 2022). **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 :-------------------------:|:-------------------------: <img src="https://user-images.githubusercontent.com/17916912/187082323-8e64ba75-dfba-42b1-80cb-5511d38e8c6e.png" width="200px"> | <img src="https://user-images.githubusercontent.com/17916912/187082328-edcf8bbb-6b51-4066-a920-396c6ed5aabb.png" width="200px"> <img src="https://user-images.githubusercontent.com/17916912/187082645-e4dcc8cc-b0ca-4067-b0eb-28c1c819880e.png" width="200px"> | <img src="https://user-images.githubusercontent.com/17916912/187082666-29285415-9341-4bfc-9e89-78fb9d3ec67b.png" width="200px"> **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](https://github.com/immich-app/immich/files/9440007/PXL_20220411_005152876.zip)
Author
Owner

@panoti commented on GitHub (Aug 28, 2022):

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

@panoti commented on GitHub (Aug 28, 2022): Hi @Cotywio, correct picture rotation is an immich feature.
Author
Owner

@alextran1502 commented on GitHub (Aug 28, 2022):

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 commented on GitHub (Aug 28, 2022): 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](https://user-images.githubusercontent.com/27055614/187093382-6215be2c-8bed-4f23-90bf-85f001b13e32.png) So the file resolution is correctly extracted from the App standpoint. We fixed the issue with the orientation in #547
Author
Owner

@Cotywio commented on GitHub (Aug 28, 2022):

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 commented on GitHub (Aug 28, 2022): 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) <img src="https://user-images.githubusercontent.com/17916912/187093721-0f5147aa-d9e2-4c7b-a59a-561b1ecb0e79.png" width=500> ![WindowsDNG](https://user-images.githubusercontent.com/17916912/187093725-3ef5e686-1698-48c4-98a2-1bbc4c64d94b.png)
Author
Owner

@panoti commented on GitHub (Aug 29, 2022):

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 commented on GitHub (Aug 29, 2022): 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.
Author
Owner

@samip5 commented on GitHub (Jan 22, 2023):

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

@samip5 commented on GitHub (Jan 22, 2023): Please check again if the issue still persists as we have moved to exiftool. @Cotywio
Author
Owner

@Cotywio commented on GitHub (Feb 1, 2023):

Fixed! Thank you for your great work!

@Cotywio commented on GitHub (Feb 1, 2023): Fixed! Thank you for your great work!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#232