LearnBoost/node-canvas — Issue #138: Image load from remote url
Author: remy
Created: 2012-01-02 11:22:28+00:00
State: open

I might be missing something *really* obvious here, but I can't see that loading images from a url works (data urls work fine).

Example:

> var Image = require('canvas').Image;
undefined
> i = new Image();
[Image]
> i.onload = function () { console.log('image loaded'); };
[Function]
> i.src = 'http://remysharp.com/images/remy.jpg';
'http://remysharp.com/images/remy.jpg'
>

Never shows "image loaded". I've been porting client side canvas code to server side with very little changes, but loading remote images seem to be tripping me up. I'm happy to mod my code to run a http.request on the url and then pass in the buffer to the `Image` but it seemed like loading images from a url should be there - so figuring I might be doing something wrong?