Bug 89120 - orientation of backround pictures
Summary: orientation of backround pictures
Status: CLOSED FIXED
Alias: None
Product: kdesktop
Classification: Miscellaneous
Component: wallpaper (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 101341 106857 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-09 00:02 UTC by hoea
Modified: 2009-01-02 20:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description hoea 2004-09-09 00:02:12 UTC
Version:            (using KDE KDE 3.2.1)
Installed from:    SuSE RPMs
OS:                Linux

jpeg pictures taken with a digital camera (i have got a 
canon powershot) have got orietation information included.

portrait pictures are displayed ok within konqueror, but if selected
as wallpaper they are shown sideways.

additional info: konqueror shows meta-info/jpeg-exif: orientation=6 or
orientaton=8
Comment 1 hoea 2004-09-09 00:17:11 UTC
sample: http://elina.htlw16.ac.at/~hoerandl/dl/img_0548.jpg
Comment 2 Jochen Deibele 2004-09-20 23:23:38 UTC
Still in Kde 3.3 (also SuSE RPMs)
Comment 3 James 2005-03-13 00:05:50 UTC
Still in 3.4.0-RC1

It's actually quite confusing since Konqueror when running as a filemanager understands the orientation, as does Kuickshow and the fancy new Photobook view.
Comment 4 Lubos Lunak 2006-06-10 08:56:25 UTC
*** Bug 101341 has been marked as a duplicate of this bug. ***
Comment 5 Andreas Kling 2006-08-16 22:42:48 UTC
*** Bug 106857 has been marked as a duplicate of this bug. ***
Comment 6 Andreas Kling 2006-08-17 00:07:00 UTC
SVN commit 573650 by kling:

Grab EXIF "Orientation" information when loading wallpapers and rotate/flip image accordingly.

FEATURE: 89120


 M  +39 -0     bgrender.cpp  


--- branches/KDE/3.5/kdebase/kcontrol/background/bgrender.cpp #573649:573650
@@ -27,6 +27,7 @@
 #include <ktempfile.h>
 #include <kcursor.h>
 #include <kmimetype.h>
+#include <kfilemetainfo.h>
 
 #ifdef HAVE_LIBART
 #include <ksvgiconengine.h>
@@ -389,6 +390,44 @@
 	    if( wp.size() != QSize( xs, ys ))
 		wp = wp.smoothScale(xs, ys);
 	}
+
+	KFileMetaInfo metaInfo(file);
+	if (metaInfo.isValid() && metaInfo.item("Orientation").isValid()) {
+	    switch (metaInfo.item("Orientation").string().toInt()) {
+		case 2:
+		    // Flipped horizontally
+		    wp = wp.mirror(true, false);
+		    break;
+		case 3:
+		    // Rotated 180 degrees
+		    wp = KImageEffect::rotate(wp, KImageEffect::Rotate180);
+		    break;
+		case 4:
+		    // Flipped vertically
+		    wp = wp.mirror(false, true);
+		    break;
+		case 5:
+		    // Rotated 90 degrees & flipped horizontally
+		    wp = KImageEffect::rotate(wp, KImageEffect::Rotate90).mirror(true, false);
+		    break;
+		case 6:
+		    // Rotated 90 degrees
+		    wp = KImageEffect::rotate(wp, KImageEffect::Rotate90);
+		    break;
+		case 7:
+		    // Rotated 90 degrees & flipped vertically
+		    wp = KImageEffect::rotate(wp, KImageEffect::Rotate90).mirror(false, true);
+		    break;
+		case 8:
+		    // Rotated 270 degrees
+		    wp = KImageEffect::rotate(wp, KImageEffect::Rotate270);
+		    break;
+		case 1:
+		default:
+		    // Normal or invalid orientation
+		    break;
+	    }
+	}
     }
 wp_out:
 
Comment 7 FiNeX 2009-01-02 20:29:01 UTC
Bug closed. Kdesktop is no more mantained.