You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Clément Vollet (JIRA)" <ji...@apache.org> on 2014/01/24 16:54:45 UTC

[jira] [Commented] (CB-4078) correctOrientation is not working on camera.getPicture for PHOTOLIBRARY (works with Camera)

    [ https://issues.apache.org/jira/browse/CB-4078?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13881070#comment-13881070 ] 

Clément Vollet commented on CB-4078:
------------------------------------

I also encounter this bug.

What I've find out is that requesting the orientation via the MediaStore gives a different result than with the ExifHelper. In case of a portrait pic, the MediaStore returns 90, when reading the exif infos gives 0 as expected.

I tried to fix it by requesting the info from Exif only (as a test only), but some pictures get a wrong orientation then (typically, pictures downloaded from the web). For pictures taken with the camera and accessed through the Gallery, it seemed to work.

However, and that is the big "WTF is happening?!" for me, after rebooting the phone, I was getting exactly the opposite results (pic taken from the camera have the wrong exif data and other the right one, with a nice symmetry on the MediaStore side, where it's the opposite...).

So, I'm a bit confused, and any help would be appreciated. The last thing I tried was to force the MediaStore to update (with MediaScannerConnection.scanFile), with no luck (maybe it's totally wrong to do that though, I was trying all I could think of).

I'm available for testing possible solutions, and will give it another go on monday anyway.

So, any idea is welcomed :)

> correctOrientation is not working on camera.getPicture for PHOTOLIBRARY (works with Camera)
> -------------------------------------------------------------------------------------------
>
>                 Key: CB-4078
>                 URL: https://issues.apache.org/jira/browse/CB-4078
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin Camera
>    Affects Versions: 2.9.0
>            Reporter: aligo
>             Fix For: 3.4.0
>
>
> Hi
> I use cameraOptions below to get the FILE_URI and to display in <img> tag:
>       correctOrientation: true
>       quality: 50
>       encodingType: Camera.EncodingType.JPEG
>       targetWidth: 300
>       targetHeight: 300
>       destinationType: window.navigator.camera.DestinationType.FILE_URI
>       sourceType: window.navigator.camera.PictureSourceType.PHOTOLIBRARY
> But the picture displayed within wrong orientation.
> Updated:
> I try use window.navigator.camera.PictureSourceType.CAMERA in sourceType, and everything work as expected.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)