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

allowEdit not work in cordova-plugin-camera

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Environment:

      cordova-plugin-camera@1.2.0
      android

      Description

      option =

      {quality: 30,sourceType: Camera.PictureSourceType.CAMERA,destinationType: Camera.DestinationType.FILE_URI,encodingType: Camera.EncodingType.JPEG,mediaType: Camera.MediaType.PICTURE}

      ;

      take picture > modify picture > return the url

      you will see the url returned is the piture not midify

      and i found CameraLauncher.java line 445
      bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString()));
      modify it:
      if(allowEdit && croppedUri != null)

      { bitmap = getScaledBitmap(FileHelper.stripFileProtocol(croppedUri.toString())); }

      else

      { bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString())); }

      bug fixed

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jcesarmobile jcesarmobile
                Reporter:
                fengxing61 gao
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: