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/06 06:23:22 UTC

[GitHub] [cordova-plugin-camera] sc0ttdav3y commented on pull request #525: Fix for the problem when Exif data is lost when getting an image from the photo library (iOS)

sc0ttdav3y commented on pull request #525:
URL: https://github.com/apache/cordova-plugin-camera/pull/525#issuecomment-654039461


   First, thanks so much to @ryaa, @incentfit and others for all your effort on this PR. This particular fix is tremendously important for Cordova, as I imagine the bulk of Cordova apps are data capture style apps with forms, photos, etc, and for one let down a customer big-time from this issue. I hope those with the power to merge this in can treat this the urgency it deserves, to prevent others suffering the same fate as I.
   
   Anyway, onto positive matters. I've done extensive real device testing — **here's what works (and doesn't work) for me**. 
   
   **Step one: install incentfit's fork**
   
   Install incentfit's fork (at this commit https://github.com/incentfit/cordova-plugin-camera/commit/e52290a5d9705b186a7b190c55a607d68f9dd6ed):
   
   ```
   cordova plugin remove cordova-plugin-camera
   cordova plugin add https://github.com/incentfit/cordova-plugin-camera.git 
   ``` 
   
   **Step two: ensure your `config.xml` has `CameraUsesGeolocation` .**
   
   ```
   <platform name="ios">
           <preference name="CameraUsesGeolocation" value="true" />
   </platform>
   ```
   
   If this is off, I verified iOS will not record the location into the image.
   
   **Step three: use this configuration when launching the camera**
   
   - `quality`: tested okay with `75`; also works when undefined
   - `destinationType`: tested okay with `Camera.DestinationType.FILE_URI` (cc @SumeetHindinkeri)
   - `sourceType`: works with both `Camera.PictureSourceType.CAMERA` and `Camera.PictureSourceType.PHOTOLIBRARY`
   - `targetHeight` and `targetWidth`: tested okay with `1920`; also works when undefined
   - `saveToPhotoAlbum`: tested okay with `true` and undefined
   
   These need special care:
   
   - `allowEdit`: in my device testing, this must be `false` to work on Android, must be `true` to work on Windows, and seems to work either way with no observable difference for iOS. I'm guessing nobody cares about Windows now, so set to `false`.
   - `correctOrientation`: must be set to `false`, otherwise Camera.PictureSourceType.PHOTOLIBRARY still loses exif data on iOS, even with @ryaa and @incentfit's work.
   
   Tested on iPhone 11 on iOS 13.5.1 and a Lenovo tablet running Android 8.1.0.
   
   Thanks again to all those that are supporting this plugin, and reach out if you need further device testing.


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