Browse Source

fixing an example in readme.md

v1.x
Gabriel Falcao 14 years ago
parent
commit
d2947dac67
  1. 2
      Readme.md

2
Readme.md

@ -46,7 +46,7 @@ console.log('<img src="' + canvas.toDataURL() + '" />');
node-canvas adds `Image#src=Buffer` support, allowing you to read images from disc, redis, etc and apply them via `ctx.drawImage()`. Below we draw scaled down squid png by reading it from the disk with node's I/O.
```javascript
fs.readFile(__dirname + '/images/squid.png', function(err){
fs.readFile(__dirname + '/images/squid.png', function(err, squid){
if (err) throw err;
img = new Image;
img.src = squid;

Loading…
Cancel
Save