cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard B Knoll (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-9796) allowEdit not work in plugin camera
Date Fri, 16 Oct 2015 00:42:05 GMT

     [ https://issues.apache.org/jira/browse/CB-9796?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Richard B Knoll updated CB-9796:
--------------------------------
    Description: 
{code:javascript}
option = {quality: 30,sourceType: Camera.PictureSourceType.CAMERA,destinationType: Camera.DestinationType.FILE_URI,encodingType:
Camera.EncodingType.JPEG,mediaType: Camera.MediaType.PICTURE};
{code}

take picture > modify picture > return the url

the url returned is the piture not midify
and i found CameraLauncher.java  line 445:

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

modify it:
{code:java}
if(allowEdit && croppedUri != null){
    bitmap = getScaledBitmap(FileHelper.stripFileProtocol(croppedUri.toString()));
}else{
    bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString()));
}
{code}

bug fixed

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

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


> allowEdit not work in plugin camera
> -----------------------------------
>
>                 Key: CB-9796
>                 URL: https://issues.apache.org/jira/browse/CB-9796
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>    Affects Versions: 1.2.0
>         Environment: android
>            Reporter: gao
>              Labels: allowEdit
>
> {code:javascript}
> option = {quality: 30,sourceType: Camera.PictureSourceType.CAMERA,destinationType: Camera.DestinationType.FILE_URI,encodingType:
Camera.EncodingType.JPEG,mediaType: Camera.MediaType.PICTURE};
> {code}
> take picture > modify picture > return the url
> the url returned is the piture not midify
> and i found CameraLauncher.java  line 445:
> {code:java}
> bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString()));
> {code}
> modify it:
> {code:java}
> if(allowEdit && croppedUri != null){
>     bitmap = getScaledBitmap(FileHelper.stripFileProtocol(croppedUri.toString()));
> }else{
>     bitmap = getScaledBitmap(FileHelper.stripFileProtocol(imageUri.toString()));
> }
> {code}
> bug fixed



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message