views:

546

answers:

4

Are there software/services for automated conversion of a typical image format (png, bmp, jpg/gif even) to Canvas / HTML5?

A: 

where do you want to make a conversion in this case? png, jpg and gif are image formats (as you said) and canvas/html is just the markup for outputting it to the user - there is no reason for not using img for that, because there is no "new" element for this in html5 - and canvas is your weapon of choice if you try to dynamicaly create or modify an image by using javascript. you don't need any "conversion" somewhere.

oezi
well, there are some creative image manipulation possibilities by converting a binary to a text-based html5 image...
ina
a canvas is not "text based", as I understand it. Its merly a bitmap (hench canvas) area which you can draw on with different functions, including vector lines and image/brushes.
BerggreenDK
+3  A: 

You don't need no conversion, just use the image (either new by url or any one in the DOM) by

canvas.drawImage(image, dx, dy)
canvas.drawImage(image, dx, dy, dw, dh)
canvas.drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh)

(taken from here).

See the tutorial on developer.mozilla.org.

mkluwe
A: 

I suggest to inform yourself what canvas is before asking such questions.

akuckartz
+1  A: 

well, I'm trying to inform myself, I would like to know where is there a list of:

1) all methods that can be applied to "canvas" (canvas.drawImage, etc..)

AND all methods for canvas.getContext();

i.e.:

var ctx = canvas.getContext("2d");
    ctx.fillStyle = "rgb(200,0,0)";
    ctx.fillRect (10, 10, 55, 50);  //  etc

thank you..

kali