[Bug 312549] New: showfoto does not correctly rotate images in the main view

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 312549] New: showfoto does not correctly rotate images in the main view

Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

            Bug ID: 312549
           Summary: showfoto does not correctly rotate images in the main
                    view
    Classification: Unclassified
           Product: showfoto
           Version: 2.9.0
          Hardware: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: [hidden email]
          Reporter: [hidden email]

Created attachment 76166
  --> https://bugs.kde.org/attachment.cgi?id=76166&action=edit
after rotation in showfoto, photo is incorrect in preview and in konqueror

After the upgrade to showfoto 2.9.0, my portrait mode photos are shown rotated
in the main view and correct in the preview pane.

When I rotate the photos manually, they are shown correctly in  the main view,
but rotated in the preview pane. When I then save them, they are shown rotated
in konqueror thumbnail preview and in gwenview. See attachment.

I tried to change the behavior by toggling the application setting metadata/
Rotate according to exif data, but to no avail.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
https://bugs.kde.org/show_bug.cgi?id=312549

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from [hidden email] ---
Same her with 2.8.0 from kubuntu 12.10.
No problems in digikam editor.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #2 from ar@home <[hidden email]> ---
(In reply to comment #1)
> Same her with 2.8.0 from kubuntu 12.10.
> No problems in digikam editor.

And also in 2.6.0 (Debian 2.6.0-1+b2).

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #3 from ar@home <[hidden email]> ---
(In reply to comment #2)
> (In reply to comment #1)
> > Same her with 2.8.0 from kubuntu 12.10.
> > No problems in digikam editor.
>
> And also in 2.6.0 (Debian 2.6.0-1+b2).

as well as in 3.0.0 (Ubuntu Beta) :-(
Any idea when the error occurred the first time? (irc 1.9 was OK).

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

Gilles Caulier-4
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #4 from Gilles Caulier <[hidden email]> ---
Exiv2 shared lib is used here to get image orientation from image metadata.

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #5 from ar@home <[hidden email]> ---
(In reply to comment #4)
> Exiv2 shared lib is used here to get image orientation from image metadata.
>
> Gilles Caulier

running exiv2 on a portrait jpeg gives

$ exiv2 -pv e2224516.jpg | grep Orientation
0x0112 Image        Orientation                 Short       1  6

(image _is_ rotated 90 degrees)

In the thumb bar the preview is shown correctly but in the edit area the image
is rotated to the left.

If I change the orientation by issuing

$ exiv2 -M"set Exif.Image.Orientation 1" e2224516.jpg

the image is shown in both the thumb bar and the edit area rotated to the left.

So it seems the exif information is evaluated correctly only  for the preview.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #6 from ar@home <[hidden email]> ---
The slide show is shown correctly; so it seems that the exifOrientation
information is not applied to the editor window.

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #7 from ar@home <[hidden email]> ---
So I played a bit with a debugger and found:

- creation of thumbnails: exif orientation is queried and used
- slideshow: exif orientation is queried and used
- called from digikam (tools->editor): exif orientation is queried (from db)
and used
- called standalone (with filename, thumbbar hidden): exif info is not queried,
orientation is always ignored...

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

Gilles Caulier-4
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #8 from Gilles Caulier <[hidden email]> ---
There is an option in Shwofoto Settings pannel, into Metadata/Behavior section.
It's turned on ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #9 from ar@home <[hidden email]> ---
(In reply to comment #8)
> There is an option in Shwofoto Settings pannel, into Metadata/Behavior
> section. It's turned on ?
>
> Gilles Caulier

I've tried both settings (on/off); it makes no difference (see also Achim's
post #1, last line).

Because debugging a unknown, mutlithreaded C++ application is a pain, I stopped
for the moment. It looks like there's a point in loadsavethread and related
methods where a decision is made whether to query exif infos or not (e. g. do
we have db infos? Which preview description type etc),

If we find the version when this behavior changed (1.9 is working fine) we
might get the bug.

Andreas

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

Gilles Caulier-4
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #10 from Gilles Caulier <[hidden email]> ---
>e. g. do we have db infos?

Showfoto do not use a DB. It take Exif orientation flag info from file metadata
and that all...

Can you share some images which have the problem in your computer

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #11 from ar@home <[hidden email]> ---
Created attachment 77656
  --> https://bugs.kde.org/attachment.cgi?id=77656&action=edit
example landscape photo

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #12 from ar@home <[hidden email]> ---
(In reply to comment #10)
> >e. g. do we have db infos?
>
> Showfoto do not use a DB. It take Exif orientation flag info from file
> metadata and that all...
>
> Can you share some images which have the problem in your computer
>
> Gilles Caulier

I know that showfoto as a standalone application doesn't use a db but digikam
does and if the component is called as the digikam editor information from the
digikam-db is used. Called as showfoto it should read the exifs an it does so
for the thumbs in the thumbbar and for the slideshow but not for the image in
the main view.

You'll find a landscape image attached (exif orientation 6)
Andreas

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

ar@home <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #77656|0                           |1
        is obsolete|                            |

--- Comment #13 from ar@home <[hidden email]> ---
Created attachment 77660
  --> https://bugs.kde.org/attachment.cgi?id=77660&action=edit
a better example

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #14 from ar@home <[hidden email]> ---
(In reply to comment #9)

> If we find the version when this behavior changed (1.9 is working fine) we
> might get the bug.
>

The last version working fine is 2.5.0.
The bug is present from 2.6.0beta1 on (introducing kexiv2 access?).

Andreas

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

Gilles Caulier-4
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #15 from Gilles Caulier <[hidden email]> ---
To localize where is the bug, please identify which library is used with
digiKam 2.5.0 and 2.6.0 :

- libkexiv2
- Exiv2

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #16 from ar@home <[hidden email]> ---
(In reply to comment #15)
> To localize where is the bug, please identify which library is used with
> digiKam 2.5.0 and 2.6.0 :
>
> - libkexiv2
> - Exiv2
>
> Gilles Caulier

For both versions:

ldd core/showfoto/showfoto | grep exiv
    libkexiv2.so.10 => /usr/lib/libkexiv2.so.10 (0xb7176000)
    libexiv2.so.12 => /usr/lib/libexiv2.so.12 (0xb3db0000)

Debugging showfoto with breakpoints at
LoadSaveThread::exifOrientation and LoadSaveThread::exifRotate

shows:

If load the file from command line with the thumbbar turned off both methods
are never called. On Turning the thumbbar on the application stops at
breakpoints and the thumbnail show a correct orientation while the main view
stays in landscape mode.


Andreas

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #17 from ar@home <[hidden email]> ---
(In reply to comment #16)
> libkexiv2.so.10 => /usr/lib/libkexiv2.so.10 (0xb7176000)
> libexiv2.so.12 => /usr/lib/libexiv2.so.12 (0xb3db0000)
>

libexiv2 from debian libexiv2-12 (0.23-1)
libkexiv2 from debian libkexiv2-10 (4.8.4-1)

 Andreas

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

ar@home
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

--- Comment #18 from ar@home <[hidden email]> ---
Looking closer I found the exifRotate property never is set since 2.6 (defaults
to false).

The lines in showfoto.cpp (2.5.0) which do the trick are now commented out:

562    bool exifRotate = group.readEntry("EXIF Rotate", true);
563   m_canvas->setExifOrient(exifRotate);

When I reactivate these, rotated images are shown correctly (tested with
git-code).

Andreas

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[showfoto] [Bug 312549] showfoto does not correctly rotate images in the main view

Gilles Caulier-4
In reply to this post by Achim Herwig
https://bugs.kde.org/show_bug.cgi?id=312549

Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #19 from Gilles Caulier <[hidden email]> ---
Thanks to investigate. This have been introduced by this commit from Marcel,
probably by error :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/77f7fd8a6413e326026ff86bf4bc7e98ee9c498d

Code change :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/77f7fd8a6413e326026ff86bf4bc7e98ee9c498d/diff/showfoto/main/showfoto.cpp

Marcel, these lines can be uncommented safetly ?

Gilles Caulier

--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12