cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
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


ASF GitHub Bot commented on CB-4078:

GitHub user swbradshaw reopened a pull request:

    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 master

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

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 <>
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:
>             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:
>       sourceType:
> {code}
> But the picture displayed within wrong orientation.
> Updated:
> I try use in sourceType, and everything
work as expected.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message