stash icon indicating copy to clipboard operation
stash copied to clipboard

[Bug Report] Image clips with rotation metadata display incorrectly in wall view and lightbox

Open jtjb07 opened this issue 1 year ago • 1 comments

Describe the bug In wall view and lightbox, image clips with rotation metadata will be correctly rotated, but their new height and width are not accounted for. E.g. 1920x1080 -> rotated 90 degrees -> 1080x1920

In wall view, this leads to gaps being created around the image clip's preview because Stash is using the unrotated height and width. example1

In lightbox, this leads to image clips being zoomed in when opened, again because the wrong height and width are being used. (edit 2024-01-01 - the same problem appears in the fullscreen slideshow view) example2

Here is an example file: https://github.com/stashapp/stash/assets/146701633/8bd7253d-e710-448e-99a3-7a7792cf4f50

To Reproduce Steps to reproduce the behavior:

  • Import example file into Stash
  • View the file with other images in the Image Tab in Wall View
  • While in wall view, open the image in the lightbox view

Stash Version: 0.25.1

Desktop: Windows 10 Chrome 123.0.6312.86

jtjb07 avatar Mar 31 '24 09:03 jtjb07

It seems it's related to how the image metadata is extracted and parsed:

  • Stash calls ffprobe to extract the image metadata including height, weight, and rotate
  • ffprobe does not seem to read the Orientation tag of EXIF data to produce the rotate metadata

zhyu avatar Apr 20 '24 04:04 zhyu