You can clone with
The callback coming from open_func doesn't include the error, instead the error is throw. The first parameter of a callback should be any error encounter or null and the error shouldn't be throw.
this has been fixed in the community-maintained version. please try:https://github.com/mikesmullin/node-gd