Public | Automated Build

Last pushed: 2 months ago
Short Description
node-canvas docker image
Full Description

node-canvas

node-canvas

Node canvas is a Cairo backed Canvas implementation for NodeJS.

node-canvas Docker Images

node-canvas docker image

Usage

Example:

$ cat index.js
var Canvas = require('canvas')
  , Image = Canvas.Image
  , canvas = new Canvas(200, 200)
  , ctx = canvas.getContext('2d');
ctx.font = '30px Impact';
ctx.rotate(.1);
ctx.fillText("Awesome!", 50, 100);
var te = ctx.measureText('Awesome!');
    ctx.strokeStyle = 'rgba(0,0,0,0.5)';
    ctx.beginPath();
    ctx.lineTo(50, 102);
    ctx.lineTo(50 + te.width, 102);
    ctx.stroke();
console.log('<img src="' + canvas.toDataURL() + '" />');

$ docker run --rm -v `pwd`:/opt/node/js geekduck/node-canvas index.js
<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAABmJLR0QA/wD/AP+gvaeTAAAMFElEQVR4nO3dd7AdZRmA8SckJJSEQDRAQpAIigg2RCni0ARslEHB3lBhwIIKIg5WcEYBxQoKKhoENYiKymBBBTvgWEC6YigqJLQgKcaQXPzj3XXfs3d370m9N8nzm9k5e/Z7t5yT/far5wYkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZIkSZK0hhk93BewEp0M7AJsAwwA9w/v5UgjxwuBR9NyzfBejjSy/IbeDLIEmDSsVySNEM+nN3OUy0uG86KkkeJ3VJni4bT+heG8KGkkOJAqQ/wXeEN6/9fhuyxpZPgVVYY4CxgLzE/bHj98lyYNrwOoMsIiYOti+4/S9jd37L8bsDswDVh/1V2mNDxyz9Xn0/YT0vaZHfufm+Le1RIzATgE2BXYbAWvV1ptnkdv2+NxKe3pKe0+YL2WY7wzxX2xJeYoeqtwTcYARwMHA88q3kvD6pc0lx4Ao4B7UvrOLcfI3cO/bom5K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