Introducing node-canvas. Server side HTML5 canvas API
Today we open sourced our latest project, node-canvas, a canvas implementation for nodejs. The project is a work in progress, however a large portion of the api is complete, including node-specific additions such as Canvas#toBuffer() and Canvas#createPNGStream().
Examples
Shown below is the test suite running side by side with the browser implementation. node-canvas renders the left, and the browser (chrome) renders the canvas on the right using the same code.
Below is an example of chrome rendering flot on the left, and node-canvas on the right.
In the next few days we’re going to publish an article on why we decided to create it, how we’re leveraging it to power our reporting features for print stylesheets, old browsers and mobile compatibility.
How to use
Make sure to install cairo. On OS X you can use macports for example:
Install it with npm
then require() it and use it just like you would use canvas on the browser
-
http://workingdraft.de/2 Revision 2: mod_pagespeed, Sub-Pixel-Positionierung und viel Hall | Working Draft
-
http://www.deadlock.it/programming/javascript/node-roundup-13/ Node Roundup | tips & tricks
-
http://jsmag.com/blog/2010/11/news-roundup-node-canvas-jquery-mobile-alpha-2-gordon/ JavaScript Magazine Blog for JSMag » Blog Archive » News roundup: node-canvas, jQuery Mobile Alpha 2, Gordon
-
http://zapisnik.pepiino.cz/dalsi-porce-zajimavosti-kolem-javascriptu-a-webu/ Další porce zajímavostí kolem Javascriptu a webu | pepiino.cz
-
http://codificando.com/2010/12/ultimas-de-2010-sobre-nodejs/ Ultimas de 2010 sobre Node.JS | codificando.com – Emerson Macedo
-
http://functionscopedev.wordpress.com/2011/04/11/phantomjs-nearly-headless-nick-for-the-web/ PhantomJS; Nearly Headless Nick for the Web | FunctionScope Development
-
http://perfectionkills.com/fabric-js-0-5-is-out/ Perfection kills » Fabric.js 0.5 is out
-
http://iloveshare.sinaapp.com/?p=215 Perfection kills » Fabric.js 0.5 is out | 前端分享
-
http://www.dafishinsea.com/blog/2011/09/22/life-forms-my-js10k-entry-is-live/ Da Fish in Sea » Blog Archive » LIFE Forms – my JS10k entry is live!

