Bug 329309 - TIF files appear not in correct orientation in Piwigo
Summary: TIF files appear not in correct orientation in Piwigo
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-WebService-Piwigo (show other bugs)
Version: 4.10.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-28 12:40 UTC by Dr. Christian Riede
Modified: 2018-02-01 05:22 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.4.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dr. Christian Riede 2013-12-28 12:40:46 UTC
I scan black and white images from film with vuescan directly into a directory inside the digikam album folder. Digikam recocnizes the the images. With the circular arroe buttons I can bring the images into correct orientation. 

When I upload the tif files to piwigo with the respective kipi plugin, the images appear in Piwigo in  their original (wrong) orientation.

Reproducible: Always

Steps to Reproduce:
1. Put 16Bit Grayscale TIF into digikam album folder
2. change orientation with circular arrow buttons
3. upload to Piwogo with kipi plugin
4. View image in Piwigo
Actual Results:  
Image appears in original orientation before pressing the  circular arrow button

Expected Results:  
Image should appears in changed orientation in Piwigo, too. This is the same orientation that digikam uses to display the image after pressing a circular arrow button

I am Using:
chr@dulcita:~$ rpm -qi kipi-plugins
Name        : kipi-plugins
Version     : 3.5.0
Release     : 4.1
Architecture: x86_64
Install Date: Do 28 Nov 2013 16:32:04 CET
Group       : Productivity/Graphics/Other
Size        : 23516715
License     : GPL-2.0+
Signature   : RSA/SHA256, Mo 21 Okt 2013 18:05:52 CEST, Key ID b88b2fd43dbdc284
Source RPM  : digikam-3.5.0-4.1.src.rpm
Build Date  : Mo 21 Okt 2013 17:56:20 CEST
Build Host  : cloud121
Relocations : (not relocatable)
Packager    : http://bugs.opensuse.org
Vendor      : openSUSE
URL         : http://www.digikam.org/
Summary     : KDE Plug-Ins for Image Manipulation
Description :
A set of plug-ins for the KDE KIPI interface, used by some KDE imaging
applications.
Distribution: openSUSE 13.1


Piwigo 2.5.3
Comment 1 caulier.gilles 2015-05-10 09:06:46 UTC
Problem still reproducible with kipi-plugins 4.9.0 ?

Gilles Caulier
Comment 2 caulier.gilles 2015-05-19 15:22:44 UTC
Christian, 

Problem still reproducible with kipi-plugins 4.10.0 ?

Gilles Caulier
Comment 3 Frédéric COIFFIER 2015-05-19 17:55:12 UTC
I haven't enough information about parameters used with the piwigo exporter but I think that I reproduce the problem.

If "Resize photos before uploading" is NOT CHECKED :
 * The TIFF file is uploaded but cannot be displayed by Piwigo : Piwigo bug as I'm not sure it is able to display 16-bits TIFFs

If "Resize photos before uploading" is CHECKED :
 * The Piwigo exporter converts the TIFF in JPEG (with a rescaling) but the EXIF Orientation seems not used during the conversion.

The conversion is done with a QImage :
QImage image;
...
image.load(mediaPath);
...
image.save(m_path, "JPEG", quality);

I don't know if QImage can convert a TIFF to JPEG by preserving the EXIF Orientation.
Comment 4 caulier.gilles 2015-05-19 18:04:15 UTC
No, QImage cannot do it. But in libkipiplugins, we can use KPMetadata to transfert metadata from TIFF to JPEG. It'sq already used in some others kipi tools...

Gilles Caulier
Comment 5 caulier.gilles 2015-07-02 07:03:21 UTC
The code relevant of photo management is located in this method :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/piwigoexport/piwigotalker.cpp#L170

And as you can see here :

https://projects.kde.org/projects/extragear/graphics/kipi-plugins/repository/revisions/master/entry/piwigoexport/piwigotalker.cpp#L227

Exif metadata are preserved while conversion/re-sizing of image...

Gilles Caulier
Comment 6 Maik Qualmann 2017-01-01 22:22:03 UTC
Git commit 17a7be96da4c005f3e2b5caf3038b3104931561c by Maik Qualmann.
Committed on 01/01/2017 at 22:19.
Pushed by mqualmann into branch 'master'.

fix exif orientation when exporting to web services
Related: bug 374242, bug 374409
FIXED-IN: 5.4.0

M  +4    -1    NEWS
M  +1    -0    dropbox/dbtalker.cpp
M  +1    -0    facebook/fbwindow.cpp
M  +1    -0    flickr/flickrtalker.cpp
M  +1    -0    googleservices/gdtalker.cpp
M  +2    -0    googleservices/gptalker.cpp
M  +1    -0    mediawiki/wmwindow.cpp
M  +2    -1    piwigo/piwigotalker.cpp
M  +1    -0    rajce/rajcesession.cpp
M  +1    -0    smug/smugwindow.cpp
M  +1    -0    yandexfotki/yfwindow.cpp

https://commits.kde.org/kipi-plugins/17a7be96da4c005f3e2b5caf3038b3104931561c