Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.
This repository was archived by the owner on Jul 24, 2026. It is now read-only.

Canvas2ImagePlugin not working in phonegap #72

Description

@TarneemOmar

Hi,

I am using phonegap to build cross-platform version of my app, I tried to test Canvas2ImagePlugin but I am not getting any result. I test it using Android Studio simulator on my phone .

Here is my code:

html:

<canvas id="myCanvas" width="250px" height="300px"></canvas> <input type="submit" onclick="capture()" value="testing">

JavaScript:

` function capture()
{

window.canvas2ImagePlugin.saveImageDataToLibrary(
function(msg){
var tvalue= document.getElementById("t1");
var c = document.getElementById('myCanvas');
var ctx = c.getContext("2d");
ctx.font = "30px Arial";
ctx.fillText(tvalue.value,10,50);
console.log(msg);
},
function(err){
console.log(err);
},
document.getElementById('myCanvas')
);

}`

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions