opened
fabikopa
username_0
Hi,
toBlob is working for the elements added to my canvas but not backgrounds that I wrote in css.
Is there a way to make save the background-image and background-color with the canvas?

Here is the function:
```javascript
$("#savepng").click(function(){
        coucou = document.getElementById("dodo"), ctx = canvas.getContext("2d");
        coucou.toBlob(function(blob){
            saveAs(blob, "myToon.png");
        });
    });
```

thankyou!
Fabi
not saving the background-image for the canvas
issue
closed
jimmywarting
username_1
issue
created
jimmywarting
username_1
You need to paint the background image to the canvas instead of using css
```javascript
var background = new Image();
background.src = "http://www.samskirrow.com/background.png";

// Make sure the image is loaded first otherwise nothing will draw.
background.onload = function(){
	ctx.drawImage(background,0,0);   
}​
```
comment
created
fabikopa
username_0
thank you, but finally I did it with easelJS and JQuery
```javascript
var backg = new createjs.Bitmap("myPath");

//in init()
$("canvas").on("load",loadBackground());

//and the function:
function loadBackground(){
    stage.addChildAt(backg,0);
}
```
comment
created
fabikopa
username_0
instead of "canvas" goes the id of the canvas
comment
created
NKW-UA
username_2
what is it stage mean?
comment