| Summary: | orientation of backround pictures | ||
|---|---|---|---|
| Product: | [Unmaintained] kdesktop | Reporter: | hoea |
| Component: | wallpaper | Assignee: | David Faure <faure> |
| Status: | CLOSED FIXED | ||
| Severity: | wishlist | CC: | echogooh, finex, gassauer, szo |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | openSUSE | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
hoea
2004-09-09 00:02:12 UTC
Still in Kde 3.3 (also SuSE RPMs) 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. *** Bug 101341 has been marked as a duplicate of this bug. *** *** Bug 106857 has been marked as a duplicate of this bug. *** 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:
Bug closed. Kdesktop is no more mantained. |