GraffitiProjectINDIGO / GRAPHIS

Generate Regions and Annotations for Photos using the IPTC Standard

Home Page:https://projectindigo.eu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] EXIF Image orientation is used differently with QT loader and rawpy loader

MartinW-S2M opened this issue · comments

Describe the bug
The JPEG rotation flag is not used and read, but it is used for the RAW files. The JPEG solution is correct, as the IPTC writes " The counting of “top row” and “leftmost” applies to pixel data as set when the pixels were (re-)organized by the camera or by software. The orientation (rotation, flipping) of the image defined by a metadata value MUST NOT be applied." But the values are stored wrongly for the RAW files, so the same region indicated in the NEFs and the JPEGs leads to different coordinates.

To Reproduce
Steps to reproduce the behavior:

  1. Import NEF image taken in landscape mode
  2. Open Image -> image is shown in potrait mode
  3. Draw geometry
  4. Geometry is in pixel coordinates of the rotated image.

Expected behavior
The Nef should be loaded unrotated. Or the orienation tag is applied for visualizations but image region coordinates are saved in unrotated coordinates

Screenshots
image

Additional context
There is a flag in the rawpy postprocessor specifying if exif orientation should be applied while processing the raw file into an image object