darktable-org / darktable

darktable is an open source photography workflow application and raw developer
https://www.darktable.org
GNU General Public License v3.0
9.15k stars 1.11k forks source link

Automatic Orientation - Failing on Vertical Orientation #10906

Closed jaystile closed 1 year ago

jaystile commented 2 years ago

Did you buy darktable from an application store ? No.

Describe the bug/issue In previous shoots the orientation was captured fine in my Sony Alpha 7 - IV when I imported the files into lighttable. Something changed, but I'm not sure what. On my last import, the orientation is incorrect for pictures taken in a vertical orientation. I posted on reddit if you would like to see how an image was imported.

When I compared the EXIF tags there does seems to be some difference: Successful vertical EXIF tags: 0..l...ap....j Failed vertical EXIF tags 0....h.ap....h

Any thoughts on what I may have changed in darktable or in my Camera would be appreciated.

exiftool reported that the Rotation is 270 degrees. In Camera the rotation displays correct in the preview

To Reproduce Please provide detailed steps to reproduce the behaviour, for example:

  1. Download the sample RAW HEIF file: https://drive.google.com/file/d/1Cogyq_8X1nWrN0WONO5W47At4aW29OJs/view?usp=sharing
  2. Go to import => add to library
  3. View the bad orientation in lighttable

Interesting

Expected behavior Expected the image to be vertically oriented and not horizontally oriented with duplicated sections.

Screenshots https://www.reddit.com/r/DarkTable/comments/s6i0a0/help_vertical_oriented_images_not_displaying/

Which commit introduced the error UNKNOWN

Platform

jaystile commented 2 years ago

I was analyzing the EXIF data with exiftools. I noticed a couple of interesting things. The EXIF data in one of my files had these tags: Camera Orientation 270 CS, Rotation 90.

Name Type Description
CameraOrientation int8u [val >> 4 & 0x3] 0 = Horizontal (normal) 1 = Rotate 90 CW 2 = Rotate 270 CW 3 = Rotate 180
Rotation int16u 0 = Horizontal (normal) 1 = Rotate 90 CW 2 = Rotate 270 CW

Rotation belongs to the 'QuickTime' group tags and 'CameraOrientation' belongs to the 'MakersNotes' group. I found that out be requesting additional info with exiftools

./exiftool -groupNames DSC00367.HIF
jaystile commented 2 years ago

Workaround

Using exiftool modify the EXIFDATA. This removes the rotation and then darktable 'orientation' module can be used to properly orient it.

/exiftool -QuickTime:Rotation=0 DSC00367.HIF
ptilopteri commented 2 years ago

but now your raw images have been changed and may become corrupted.

better a script or another solution which does not change your raw images.

RomainQuidet commented 2 years ago

Same issue here with my iphone HEIC images! All imported vertical images in DT 3.8 are incorrectly oriented with tag 1....h.ap....h. Never used DT before so I don't know which commit did introduce this bug. If I deactivate the orientation module in edit view, the orientation come back to the correct one...

Exiftool output:

2021-12 exiftool IMG_4936.HEIC ExifTool Version Number : 12.39 File Name : IMG_4936.HEIC Directory : . File Size : 512 KiB File Modification Date/Time : 2021:12:01 17:06:17+01:00 File Access Date/Time : 2022:01:21 18:41:32+01:00 File Inode Change Date/Time : 2022:01:21 18:08:47+01:00 File Permissions : -rw------- File Type : HEIC File Type Extension : heic MIME Type : image/heic Major Brand : High Efficiency Image Format HEVC still image (.HEIC) Minor Version : 0.0.0 Compatible Brands : mif1, MiPr, miaf, MiHB, heic Handler Type : Picture Primary Item Reference : 36 Meta Image Size : 3088x2320 Exif Byte Order : Big-endian (Motorola, MM) Make : Apple Camera Model Name : iPhone X Orientation : Rotate 90 CW X Resolution : 72 Y Resolution : 72 Resolution Unit : inches Software : 14.8.1 Modify Date : 2021:12:01 17:06:17 Host Computer : iPhone X Y Cb Cr Positioning : Centered Exposure Time : 1/17 F Number : 2.2 Exposure Program : Program AE ISO : 500 Exif Version : 0232 Date/Time Original : 2021:12:01 17:06:17 Create Date : 2021:12:01 17:06:17

github-actions[bot] commented 2 years ago

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

jaystile commented 2 years ago

Bump. Still an issue for me.

github-actions[bot] commented 2 years ago

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

benjcmin commented 2 years ago

Still an issue with HEIC images in DT4 , so guess this is still open. (same photos show correct orrientation in e.g. digikam)

github-actions[bot] commented 1 year ago

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

tussock commented 1 year ago

This is still an issue. All vertical HEIC photos are wrong in DT4, when imported from an iPhone.

github-actions[bot] commented 1 year ago

This issue did not get any activity in the past 60 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

victoryforce commented 1 year ago

This is still an issue. All vertical HEIC photos are wrong in DT4, when imported from an iPhone.

@tussock @benjcmin Recently, changes were made to the handling of orientation in HEIF images. I would appreciate it if you could check if the current dt build has fixed your problem.

jaystile commented 1 year ago

@victoryforce , I ran through my original test images with Darktable version 4.2.0 and it worked! The images are not auto rotated by default (which is just fine by me). If @tussock or @benjcmin give the thumbs up, I'll close out the ticket. Thank you!

Nilvus commented 1 year ago

Better to close that now (we could have feedback or not by them). @tussock or @benjcmin: this should work now with 4.2.0. If not, ping me to reopen it.