incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lorin Beer (JIRA)" <>
Subject [jira] [Commented] (CB-1246) camera.getPicture should keep original date and orientation
Date Thu, 20 Sep 2012 04:49:08 GMT


Lorin Beer commented on CB-1246:

Hi George,

you can access the hack on my fork here:

the only change is in CDVCamera.m, which returns a json string with the file uli and image
metadata, instead of just the uli. Note that this breaks expected behaviour and isn't a final

exif data key: "{Exif}" 
tiff data key: "{TIFF}"

Here's an example of how to use the new return value
            function(data) {
                var img = document.getElementById('camera_image');
       = "visible";
       = "block";
                //parse and display the entire metadata block
                data = JSON.parse(data);
                //access file uli
                img.src = data.file_uri;
                document.getElementById('camera_status').innerHTML = "Success";
            function(e) {
                console.log("Error getting picture: " + e);
                document.getElementById('camera_status').innerHTML = "Error getting picture.";
            { quality: 50, destinationType:
            Camera.DestinationType.FILE_URI, sourceType : Camera.PictureSourceType.CAMERA});

> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>                 Key: CB-1246
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Lorin Beer
>              Labels: newbie
>             Fix For: 2.2.0
> When getting a resized image from camera.getPicture(), the exif data is stripped out
(which I understand is a hard thing to keep). However it would really help if we knew the
original date that the photo was taken. Are we able to get either the lastmodified date of
the original image passed through in the success method, or even better send through the exif
value for date created?
> Thanks for your help,
> George

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message