Merge lp:~fboucault/gallery-app/respect_exif_orientation into lp:gallery-app

Proposed by Florian Boucault
Status: Merged
Approved by: Bill Filler
Approved revision: 1098
Merged at revision: 1098
Proposed branch: lp:~fboucault/gallery-app/respect_exif_orientation
Merge into: lp:gallery-app
Diff against target: 59 lines (+7/-8)
2 files modified
rc/qml/MediaViewer/MediaViewer.qml (+1/-2)
rc/qml/MediaViewer/SingleMediaViewer.qml (+6/-6)
To merge this branch: bzr merge lp:~fboucault/gallery-app/respect_exif_orientation
Reviewer Review Type Date Requested Status
Bill Filler (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Arthur Mello (community) Approve
Review via email: mp+237805@code.launchpad.net

Commit message

Respect EXIF orientation when showing a photo by starting to use the GalleryStandardImageProvider again.

To post a comment you must log in.
Revision history for this message
Arthur Mello (artmello) wrote :

lgtm and the problem seems to be fixed on device

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

tested, works

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rc/qml/MediaViewer/MediaViewer.qml'
2--- rc/qml/MediaViewer/MediaViewer.qml 2014-09-26 20:06:51 +0000
3+++ rc/qml/MediaViewer/MediaViewer.qml 2014-10-09 16:19:30 +0000
4@@ -166,8 +166,7 @@
5 delegate: SingleMediaViewer {
6 id: media
7 objectName: "openedMedia" + index
8- mediaFileURL: model.mediaSource.path
9- mediaFileType: model.mediaSource.type
10+ mediaSource: model.mediaSource
11 maxDimension: Math.max(galleryPhotoViewer.width, galleryPhotoViewer.height)
12
13 width: galleryPhotoViewer.width
14
15=== modified file 'rc/qml/MediaViewer/SingleMediaViewer.qml'
16--- rc/qml/MediaViewer/SingleMediaViewer.qml 2014-10-08 02:34:11 +0000
17+++ rc/qml/MediaViewer/SingleMediaViewer.qml 2014-10-09 16:19:30 +0000
18@@ -27,12 +27,11 @@
19 Item {
20 id: viewer
21 property bool pinchInProgress: zoomPinchArea.active
22- property var mediaFileType
23- property string mediaFileURL
24+ property var mediaSource
25 property real maxDimension
26 property bool showThumbnail: true
27
28- property bool isVideo: mediaFileType === MediaSource.Video
29+ property bool isVideo: mediaSource.type === MediaSource.Video
30 property bool isPlayingVideo: isVideo && video.isPlaying
31 property bool userInteracting: pinchInProgress || flickable.sizeScale != 1.0
32 property bool fullyZoomed: flickable.sizeScale == zoomPinchArea.maximumZoom
33@@ -152,7 +151,7 @@
34 anchors.fill: parent
35 asynchronous: true
36 cache: false
37- source: viewer.isVideo ? ("image://thumbnailer/" + mediaFileURL) : mediaFileURL
38+ source: mediaSource.galleryPreviewPath
39 sourceSize {
40 width: viewer.maxDimension
41 height: viewer.maxDimension
42@@ -169,7 +168,8 @@
43 anchors.fill: parent
44 asynchronous: true
45 cache: false
46- source: flickable.sizeScale > 1.0 ? mediaFileURL : ""
47+ // Load image using the GalleryStandardImageProvider to ensure EXIF orientation
48+ source: flickable.sizeScale > 1.0 ? mediaSource.galleryPath : ""
49 sourceSize {
50 width: width
51 height: height
52@@ -184,7 +184,7 @@
53 visible: viewer.isVideo && video.status == Loader.Ready &&
54 video.item.playbackState !== MediaPlayer.StoppedState
55 onLoaded: {
56- item.source = mediaFileURL;
57+ item.source = mediaSource.path;
58 item.play()
59 }
60

Subscribers

People subscribed via source and target branches