Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-10936

correctOrientation not working when picking up from library on certain devices

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.1.0, 2.1.1
    • None
    • cordova-plugin-camera

    Description

      When using for example: Samsung S6 Edge the correctOrientation isn't working when using the following properties:

      var options = {
            sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
            destinationType: Camera.DestinationType.DATA_URL
            mediaType: Camera.MediaType.PICTURE,
            allowEdit: false,
            encodingType: Camera.EncodingType.JPEG,
            targetWidth: 900,
            targetHeight: 900,
            quality: 80,
            saveToPhotoAlbum: true,
            correctOrientation: true
          };
      

      This issue happens only on certain devices, it works fine for the majority, I've tested it in 7 devices

      if the image is retrieved from the library without any transformation and by the file url it is fine:

      var options = {
            sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
            destinationType: Camera.DestinationType.FILE_URI
            mediaType: Camera.MediaType.PICTURE,
            allowEdit: false,
            encodingType: Camera.EncodingType.JPEG,
            saveToPhotoAlbum: true,
            correctOrientation: true
          };
      

      when using Camera.DestinationType.FILE_URI even if targetWidth and targetHeight are set it completely ignores it. It returns the path to the full image

      Attachments

        Activity

          People

            Unassigned Unassigned
            jgranja jose
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: