Bug 419410 - Fuji S3Pro Image Preview Rotation is wrong
Summary: Fuji S3Pro Image Preview Rotation is wrong
Status: RESOLVED WORKSFORME
Alias: None
Product: digikam
Classification: Applications
Component: Preview-Image (show other bugs)
Version: 7.0.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-30 08:49 UTC by Martin Althoff
Modified: 2020-04-01 18:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 7.0.0
Sentry Crash Report:


Attachments
rotation.png (1.11 MB, image/png)
2020-04-01 18:22 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Althoff 2020-03-30 08:49:59 UTC
SUMMARY
Another Fuji S3Pro Problem, this time the raw files. 

When looking at the any (!) RAF file, the thumbnail has a particular orientation, the preview will show it rotated 90° to the right. Edit will show the same as the thumbnail. Note: those purple DNGs (unfortunately all RAFs are gone) I have (bug 418645), do not have the rotation problem.


STEPS TO REPRODUCE
1. just open an image in digikam


$ exiftool DSCF3525.RAF |grep -i ori
Orientation                     : Horizontal (normal)

This indicates the preview is wrong

sample image:
https://my.mail.de/dl/e2d7c2efb1cef9801f56a758f88e9beb


digikam version 7.0.0-beta3
CPU cores: 4
Eigen: 3.3.4
Exiv2: 0.27.2
Exiv2 can write to Jp2: Yes
Exiv2 can write to Jpeg: Yes
Exiv2 can write to Pgf: Yes
Exiv2 can write to Png: Yes
Exiv2 can write to Tiff: Yes
Exiv2 supports XMP metadata: Yes
HEIF encoding support: Yes
ImageMagick codecs support: No
KF5: 5.44.0
LensFun: 0.3.2-0
LibCImg: 130
LibJPEG: 80
LibJasper support: No
LibLCMS: 2090
LibLqr support: Yes
LibPGF: 7.19.03
LibPNG: 1.6.36
LibRaw: 0.20.0
LibTIFF: 4.0.9
Marble: 0.27.20
Parallelized demosaicing: Yes
Qt: 5.9.5
Qt WebEngine support: Yes
VKontakte support: No
AkonadiContact support: No
Baloo support: Yes
Calendar support: Yes
DBus support: Yes
Database backend: QSQLITE
HTML Gallery support: Yes
LibGphoto2: 2.5.16
LibOpenCV: 4.3.0-pre
Media player support: No
Panorama support: No
Comment 1 Maik Qualmann 2020-03-30 11:33:23 UTC
I don't see any mistake from digiKam. Alignment of RAW files is an issue in itself. In principle, we always get an aligned image from Libraw and can only hope that Libraw interpreted it correctly. For your image, thumbnail, RAW preview and Editor, the image is correctly (rotated) aligned. As Exiftool also confirmed, the camera saved "Normal" as the orientation flag. Exactly this orientation is shown. Your camera saved the wrong orientation flag. Position sensor malfunction?

Maik
Comment 2 Maik Qualmann 2020-03-30 17:24:58 UTC
Other programs such as Darktable or RawTherapee also open the image in the same orientation as digiKam. If your thumbnail created by older versions of digiKam is not correct, create a new one with "F5" or the maintenance tool. I close the bug.

Maik
Comment 3 Martin Althoff 2020-04-01 18:04:06 UTC
Maik, 

Maybe I was not clear enough. 

What I find the problem is that the rotation appears _different_ between the Thumbs and
editor vs Preview: DSCF3525.raf with Preview being wrong, the gravestone points to the
bottom not to the right side as it should. 

F5 / maintainance have now positive effect! The 90° difference between preview vs
thumb/edit remains.

So its not a matter of not showing in the proper orientation, raw files from the S3Pro
never have. I can see that in many images. But the preview rotates 90° clockwise for no
reason.

Yes, Rawtherapee shows it pointing to the right, that is correct, until I apply rotation.
It deos so in all views. 

Martin




On Mon, 2020-03-30 at 17:24 +0000, Maik Qualmann wrote:
> https://bugs.kde.org/show_bug.cgi?id=419410
> 
> Maik Qualmann <metzpinguin@gmail.com> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>    Version Fixed In|                            |7.0.0
>          Resolution|---                         |WORKSFORME
>              Status|REPORTED                    |RESOLVED
> 
> --- Comment #2 from Maik Qualmann <metzpinguin@gmail.com> ---
> Other programs such as Darktable or RawTherapee also open the image in the same
> orientation as digiKam. If your thumbnail created by older versions of digiKam
> is not correct, create a new one with "F5" or the maintenance tool. I close the
> bug.
> 
> Maik
>
Comment 4 Maik Qualmann 2020-04-01 18:22:03 UTC
Created attachment 127169 [details]
rotation.png

See the screenshot, is this correct? Do you have a sidecar file that stores another rotation? set the alignment under Menu-> Item-> Exif Alignment to "normal".

Maik
Comment 5 Martin Althoff 2020-04-01 18:46:34 UTC
Maik,

thanks for that. Your screenshot is correct. There is an old (2014) xmp sidecar. After
applying "normal", the sidecar changed: from  tiff:Orientation="8" (rotated
left) to  tiff:Orientation="1". 

I am a bit worried to automatically deal with metadata/sidecars (read or write) (there are
a few thousand xmp's), for a) fear of loosing information eg. tags that I introduced years
ago or b) reading garbage into digikam. 

take care again,
Martin

On Wed, 2020-04-01 at 18:22 +0000, Maik Qualmann wrote:
> https://bugs.kde.org/show_bug.cgi?id=419410
> 
> --- Comment #4 from Maik Qualmann <metzpinguin@gmail.com> ---
> Created attachment 127169 [details]
>   --> https://bugs.kde.org/attachment.cgi?id=127169&action=edit
> rotation.png
> 
> See the screenshot, is this correct? Do you have a sidecar file that stores
> another rotation? set the alignment under Menu-> Item-> Exif Alignment to
> "normal".
> 
> Maik
>