I'm not familiar with node-png or thrift but I've done something
similar with node-gd. I fetched the image (with mikeal's request) and
gave it straight to node-gd which works fine. It might be something
with binary encoding in your example? Anyway, here's my code (in
CoffeeScript) if it's of any help!
request
uri: 'https://graph.facebook.com/' + id + '/picture?type=large',
encoding: 'binary',
(error, response, body) ->
# If all went well (FIXME: Otherwise we might want to try
again a few times)
if not error and response.statusCode is 200
try
# Load image directly
image = gd.createFromPngPtr body
> --
> You received this message because you are subscribed to the Google Groups "nodejs" group.
> To post to this group, send email to nod...@googlegroups.com.
> To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
>
>
--
Linus G Thiel
Hansson & Larsson
http://hanssonlarsson.se/
+46 709 89 03 85