You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "George Burrows (JIRA)" <ji...@apache.org> on 2012/08/15 17:12:38 UTC

[jira] [Created] (CB-1246) camera.getPicture should keep original date

George Burrows created CB-1246:
----------------------------------

             Summary: camera.getPicture should keep original date
                 Key: CB-1246
                 URL: https://issues.apache.org/jira/browse/CB-1246
             Project: Apache Cordova
          Issue Type: Improvement
          Components: iOS
    Affects Versions: 1.7.0
            Reporter: George Burrows
            Assignee: Shazron Abdullah


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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453516#comment-13453516 ] 

Shazron Abdullah commented on CB-1246:
--------------------------------------

2.1.0 should be out in a few days. This issue has been assigned a developer who has estimated that this should be able to be patched by the end of this week.
                
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Shazron Abdullah
>              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: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1246:
---------------------------------

    Summary: camera.getPicture should keep original date and orientation  (was: camera.getPicture should keep original date)
    
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Shazron Abdullah
>              Labels: newbie
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Lorin Beer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459336#comment-13459336 ] 

Lorin Beer edited comment on CB-1246 at 9/21/12 3:44 AM:
---------------------------------------------------------

Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value

{noformat} navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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});
};
{noformat}
                
      was (Author: lorin.beer):
    Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value

{quote} navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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});
};
{quote}
                  
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Lorin Beer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459336#comment-13459336 ] 

Lorin Beer commented on CB-1246:
--------------------------------

Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value

        navigator.camera.getPicture(
            function(data) {
                var img = document.getElementById('camera_image');
                img.style.visibility = "visible";
                img.style.display = "block";
                //parse and display the entire metadata block
                data = JSON.parse(data);
                console.log(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: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Lorin Beer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457402#comment-13457402 ] 

Lorin Beer commented on CB-1246:
--------------------------------

Hi George,

I took a loot at this issue over the weekend. There are a few ways we can get access to the exif meta data and pass it through.

I've got a hack which will work to get you the image meta data. We are discussing the best way of providing the full metadata in CB-1285.

                
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1246) camera.getPicture should keep original date

Posted by "George Burrows (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435241#comment-13435241 ] 

George Burrows commented on CB-1246:
------------------------------------

A quick thought - Maybe an alternative to sending through the original date in the success method would be to just set the lastmodified date for the resized image to be the same as the original?
                
> camera.getPicture should keep original date
> -------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Shazron Abdullah
>              Labels: newbie
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Lorin Beer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459336#comment-13459336 ] 

Lorin Beer edited comment on CB-1246 at 9/21/12 3:36 AM:
---------------------------------------------------------

Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value
bq.
{quote} navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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});
};


                
      was (Author: lorin.beer):
    Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value
bq.
navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Lorin Beer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459336#comment-13459336 ] 

Lorin Beer edited comment on CB-1246 at 9/21/12 3:43 AM:
---------------------------------------------------------

Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value

{quote} navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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});
};
{quote}
                
      was (Author: lorin.beer):
    Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value
bq.
{noformat navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "George Burrows (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457762#comment-13457762 ] 

George Burrows commented on CB-1246:
------------------------------------

Thanks for your help Lorin,

Do you have details of the hack that I could use until CB-1285 is completed?
                
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Lorin Beer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459336#comment-13459336 ] 

Lorin Beer edited comment on CB-1246 at 9/21/12 3:37 AM:
---------------------------------------------------------

Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value
bq.
{noformat navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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});
};}


                
      was (Author: lorin.beer):
    Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value
bq.
{quote} navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Commented] (CB-1246) camera.getPicture should keep original date

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13435418#comment-13435418 ] 

Shazron Abdullah commented on CB-1246:
--------------------------------------

Since we are only supporting iOS 4 now, we should also use imageWithCGImage:scale:orientation: from UIImage: http://developer.apple.com/library/ios/#documentation/uikit/reference/UIImage_Class/Reference/Reference.html

This keeps the orientation as well. We were probably using the basic CG functions before because of iOS 3 support.
                
> camera.getPicture should keep original date
> -------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Shazron Abdullah
>              Labels: newbie
>
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah resolved CB-1246.
----------------------------------

    Resolution: Duplicate

Closing - essentially a dupe since if CB-1285 is fixed, it will fix this one. 
                
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Lorin Beer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13459336#comment-13459336 ] 

Lorin Beer edited comment on CB-1246 at 9/21/12 3:34 AM:
---------------------------------------------------------

Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value
bq.
navigator.camera.getPicture( 
function(data) {
    var img = document.getElementById('camera_image');
    img.style.visibility = "visible";
    img.style.display = "block";
    //parse and display the entire metadata block
    data = JSON.parse(data);
    console.log(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});
};


                
      was (Author: lorin.beer):
    Hi George,

you can access the hack on my fork here:

https://github.com/lorinbeer/incubator-cordova-ios/tree/CB-1246

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 solution.

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

Here's an example of how to use the new return value

        navigator.camera.getPicture(
            function(data) {
                var img = document.getElementById('camera_image');
                img.style.visibility = "visible";
                img.style.display = "block";
                //parse and display the entire metadata block
                data = JSON.parse(data);
                console.log(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: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1246:
---------------------------------

    Fix Version/s: 2.1.0
    
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Shazron Abdullah
>              Labels: newbie
>             Fix For: 2.1.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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "George Burrows (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13453492#comment-13453492 ] 

George Burrows commented on CB-1246:
------------------------------------

Hi Shazron, 

I see you've bumped this to the next release. 

Do you have any idea when 2.1.0 and 2.2.0 are due? This is a bit of a show-stopper for us at the moment so it would really help to have any kind of estimate.

Thank you for your great work - Cordova is awesome!

George
                
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Shazron Abdullah
>              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: http://www.atlassian.com/software/jira

[jira] [Assigned] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah reassigned CB-1246:
------------------------------------

    Assignee: Lorin Beer  (was: Shazron Abdullah)
    
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             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: http://www.atlassian.com/software/jira

[jira] [Updated] (CB-1246) camera.getPicture should keep original date and orientation

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-1246?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah updated CB-1246:
---------------------------------

    Fix Version/s:     (was: 2.1.0)
                   2.2.0

Punting to 2.2.0
                
> camera.getPicture should keep original date and orientation
> -----------------------------------------------------------
>
>                 Key: CB-1246
>                 URL: https://issues.apache.org/jira/browse/CB-1246
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: iOS
>    Affects Versions: 1.7.0
>            Reporter: George Burrows
>            Assignee: Shazron Abdullah
>              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: http://www.atlassian.com/software/jira