You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/07 18:39:01 UTC

[GitHub] [cordova-plugin-camera] hungabor01 opened a new issue #623: Data url does not contain gps information

hungabor01 opened a new issue #623:
URL: https://github.com/apache/cordova-plugin-camera/issues/623


   # Bug Report
   
   ## Problem
   When using navigator.camera.getPicture function with data url destination type, the returned base64 string does not contain the gps exif information. I am able to extract other exif data, like orientation or height, but the longitude, latitude values are undefined.
   
   ### What is expected to happen?
   For example, attaching an image from photo library with gps information, the longitude, latitude values can be extracted from  the base64 data url of the image.
   
   ### What does actually happen?
   Longitude and latitude values are given back as undefined.
   
   ## Information
   I am using the base64 string of the image as destination type, because it is necessary later on. So I can only use other destination types, if I can get the base64 string of the image as well.
   
   ### Command or Code
   ```
   var successCallback = function (imageData) { 
           var image = new Image();
           image.onload = function () {
               EXIF.getData(image, function () {
                   var lat = EXIF.getTag(this, "GPSLatitude"),
                       long = EXIF.getTag(this, "GPSLongitude");
                   console.log("lat and long: " + lat + " " + long); //and do other stuff with the long, lat values
               });
           };
           image.src = imageData;
   
           var dataUri = "data:image/jpeg;base64," + imageData,
               fileInfo = {
                   name: 'img.jpg',
                   type: 'image/jpg'
               };            
   
           me.SaveImageData(dataUri, fileInfo); //display, put in local store, send to server
       };  
   
   navigator.camera.getPicture(successCallback, 
               failureCallback, 
               {
                   sourceType: fromvalue, //user selection
                   destinationType: Camera.DestinationType.DATA_URL,
                   targetWidth: 800,
                   targetHeight: 600
               });
   ```
   
   ### Environment, Platform, Device
   Android and iOS (tried on different versions as well)
   capturing image and attaching existing one, both cases
   
   ### Version information
   cordova 7.0.1
   cordova-plugin-camera 4.0.3 (latest supported version for this cordova version)
   
   ## Checklist
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   
   Note, I could not find any information that this plugin is not able to return the gps information in the exif data, that is why I consider this as a bug. However, since I am no expert in cordova, maybe I am doing something wrong or missing something. Therefore I posted a question to [stakoverflow](https://stackoverflow.com/questions/62781535/in-cordova-navigator-camera-getpicture-function-data-url-does-not-return-gps-lo) as well. If this does not qualify as a bug, but somebody can help, I would appreciate anything.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-camera] hungabor01 commented on issue #623: Data url does not contain gps information

Posted by GitBox <gi...@apache.org>.
hungabor01 commented on issue #623:
URL: https://github.com/apache/cordova-plugin-camera/issues/623#issuecomment-680069405


   Thank you, ryaa's version indeed solved all of my issues.
   https://github.com/ryaa/cordova-plugin-camera


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-camera] sc0ttdav3y edited a comment on issue #623: Data url does not contain gps information

Posted by GitBox <gi...@apache.org>.
sc0ttdav3y edited a comment on issue #623:
URL: https://github.com/apache/cordova-plugin-camera/issues/623#issuecomment-659865804


   Take a look at this PR thread for details of current progress on a fix for missing exif data: https://github.com/apache/cordova-plugin-camera/pull/525


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-camera] hungabor01 closed issue #623: Data url does not contain gps information

Posted by GitBox <gi...@apache.org>.
hungabor01 closed issue #623:
URL: https://github.com/apache/cordova-plugin-camera/issues/623


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [cordova-plugin-camera] sc0ttdav3y commented on issue #623: Data url does not contain gps information

Posted by GitBox <gi...@apache.org>.
sc0ttdav3y commented on issue #623:
URL: https://github.com/apache/cordova-plugin-camera/issues/623#issuecomment-659865804


   Take a look at this PR thread for details of current progress on a fix.
   
   https://github.com/apache/cordova-plugin-camera/pull/525


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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