Ticket #12424: 0003-Fix-image-orientation.patch

File 0003-Fix-image-orientation.patch, 1.7 KB (added by Roger Siddons <dizygotheca@…>, 5 years ago)

Patch 3

  • mythtv/libs/libmythui/mythimage.cpp

    From c406ee1f4697af53ee7e63a592759731e0d35dab Mon Sep 17 00:00:00 2001
    From: Roger Siddons <dizygotheca@ntlworld.com>
    Date: Thu, 26 Mar 2015 09:28:46 +0000
    Subject: [PATCH 3/4] Fix image orientation
    
    Image re-orientation is currently inverted -portrait images are shown upside-down.
    
    diff --git a/mythtv/libs/libmythui/mythimage.cpp b/mythtv/libs/libmythui/mythimage.cpp
    index f2785ce..7b951a6 100644
    a b void MythImage::Orientation(int orientation) 
    144144        Assign(mirrored(false, true));
    145145        break;
    146146
    147     case 5: // The image is transposed (rotated 90° CW flipped horizontally)
     147    case 5: // The image is transposed (flipped horizontally, then rotated 90° CCW)
    148148        matrix.rotate(90);
    149149        Assign(transformed(matrix, Qt::SmoothTransformation));
    150150        Assign(mirrored(true, false));
    151151        break;
    152152
    153153    case 6: // The image is rotated 90° CCW
    154         matrix.rotate(270);
     154        matrix.rotate(90);
    155155        Assign(transformed(matrix, Qt::SmoothTransformation));
    156156        break;
    157157
    158     case 7: // The image is transversed  (rotated 90° CW and flipped vertically)
    159         matrix.rotate(90);
     158    case 7: // The image is transversed (flipped horizontally, then rotated 90° CW)
     159        matrix.rotate(270);
    160160        Assign(transformed(matrix, Qt::SmoothTransformation));
    161         Assign(mirrored(false, true));
     161        Assign(mirrored(true, false));
    162162        break;
    163163
    164164    case 8: // The image is rotated 90° CW
    165         matrix.rotate(90);
     165        matrix.rotate(270);
    166166        Assign(transformed(matrix, Qt::SmoothTransformation));
    167167        break;
    168168