cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-4078) correctOrientation is not working on camera.getPicture for PHOTOLIBRARY (works with Camera)
Date Thu, 28 Apr 2016 02:29:13 GMT

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

ASF GitHub Bot commented on CB-4078:
------------------------------------

GitHub user swbradshaw reopened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/197

    CB-4078: correctOrientation not working on camera.getPicture for PHOTOLIBRARY

    This fixes the orientation bug for Android 4.4+ devices when choosing a picture from the
photo library.
    
    This fixes both DATA_URL and FILE_URI requests.
    
    Tested on Android 4.0.4,  Android 5.02, and Android 5.1 devices.
    
    
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/swbradshaw/cordova-plugin-camera master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-camera/pull/197.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #197
    
----
commit f2b4eeded069d791aec0670b369bab8fb3bfd0eb
Author: swbradshaw <swbradshaw@gmail.com>
Date:   2016-04-28T02:27:37Z

    CB-4078: Fix for orientation/scaling on Android 4.4+ devices
    
    The only way to get rotation for photos in library (Gallery, File
    System, Google Drive,etc) is to first create a temporary file from the
    provider. Only then can we determine the orientation and scale the
    bitmap correctly. By doing it in a central place, it eliminates reading
    the inputstream repetitively in the plugin.

----


> 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: Plugin Camera
>    Affects Versions: 2.9.0
>         Environment: Android
>            Reporter: aligo
>            Priority: Minor
>              Labels: Android, Triaged
>
> Hi
> I use cameraOptions below to get the FILE_URI and to display in <img> tag:
> {code}
>       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
> {code}
> 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.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message