Re: [Tracker] Request for review: Upstreaming Jolla patch that corrects rotation tags



On 02/01/14 14:25, Philip Van Hoof wrote:
---
  src/libtracker-extract/tracker-xmp.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libtracker-extract/tracker-xmp.c b/src/libtracker-extract/tracker-xmp.c
index 8729af0..d0c5453 100644
--- a/src/libtracker-extract/tracker-xmp.c
+++ b/src/libtracker-extract/tracker-xmp.c
@@ -301,9 +301,9 @@ fix_orientation (const gchar *orientation)
        } else if (orientation && g_ascii_strcasecmp (orientation, "2") == 0) {
                return  "nfo:orientation-top-mirror";
        } else if (orientation && g_ascii_strcasecmp (orientation, "3") == 0) {
-               return "nfo:orientation-bottom-mirror";
-       } else if (orientation && g_ascii_strcasecmp (orientation, "4") == 0) {
                return  "nfo:orientation-bottom";
+       } else if (orientation && g_ascii_strcasecmp (orientation, "4") == 0) {
+               return "nfo:orientation-bottom-mirror";
        } else if (orientation && g_ascii_strcasecmp (orientation, "5") == 0) {
                return  "nfo:orientation-left-mirror";
        } else if (orientation && g_ascii_strcasecmp (orientation, "6") == 0) {
-- 1.8.4.2

Hello Philip,

Actually this patch looks wrong to me. According to the specification:

"""
1 = 0th row at top, 0th column at left
2 = 0th row at top, 0th column at right
3 = 0th row at bottom, 0th column at right
4 = 0th row at bottom, 0th column at left
5 = 0th row at left, 0th column at top
6 = 0th row at right, 0th column at top
7 = 0th row at right, 0th column at bottom
8 = 0th row at left, 0th column at bottom
"""

I presume that "-mirror" means the 0th column is on the right (otherwise all of our orientations are out).

The specification I checked with is here (page 60):

http://partners.adobe.com/public/developer/en/xmp/sdk/XMPspecification.pdf

--
Regards,
Martyn

Founder & Director @ Lanedo GmbH.
http://www.linkedin.com/in/martynrussell


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]