LearnBoost/node-canvas — Issue #146: Writing to JPEG crashing
Author: jimlears
Created: 2012-01-20 11:43:10+00:00
State: open

1. canvas 0.10.0, node 0.6.7
2. canvas.createJPEGStream().pipe(fs.createWriteStream('/tmp/foo.jpeg'));
3. Get this error:

```
TypeError: Object # has no method 'streamJPEGSync'
at Array.0 (/Users/jim/Public/mom/node/generator/node_modules/canvas/lib/jpegstream.js:43:18)
at EventEmitter._tickCallback (node.js:192:40)
```

I didn't look too deeply into this so this is total speculation, but is HAVE_JPEG not getting defined, so the this is not getting called during compile?

```
#ifdef HAVE_JPEG
NODE_SET_PROTOTYPE_METHOD(constructor, "streamJPEGSync", StreamJPEGSync);
#endif
```