You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Vladimir Kotikov (JIRA)" <ji...@apache.org> on 2014/05/02 08:43:16 UTC

[jira] [Commented] (CB-6612) Camera.DestinationType.DATA_URL does not work with WP8 with org.apache.cordova.camera@0.2.9 unless targetWidth and targetHeight are explicitly set

    [ https://issues.apache.org/jira/browse/CB-6612?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13987437#comment-13987437 ] 

Vladimir Kotikov commented on CB-6612:
--------------------------------------

Problem is when width/height is set, getPicture returns a BASE64 encoded data of JPEG image and you can use JS code like
{noformat}
image.setAttribute('src', 'data:image/jpeg;base64,' + imageData)
{noformat}
but when width/height is not provided to getPicture, it returns encoded raw bitmap, and previous code fails.

> Camera.DestinationType.DATA_URL does not work with WP8 with org.apache.cordova.camera@0.2.9 unless targetWidth and targetHeight are explicitly set
> --------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CB-6612
>                 URL: https://issues.apache.org/jira/browse/CB-6612
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera, WP8
>    Affects Versions: 2.9.0
>            Reporter: Vladimir Kotikov
>            Assignee: Jesse MacFadyen
>
> Reproduction steps:
> 1. create a new cordova app
> 2. add the camera plugin, version 0.2.9 (latest)
> 3. add the wp8 platform
> 4. use getPicture with DATA_URL option and no width/height set
> Result:
> No valid imageData is returned in the success callback.



--
This message was sent by Atlassian JIRA
(v6.2#6252)