mash/node-imagemagick-native — pull request #59 by cartuchogl (2014-11-04 23:32:16+00:00)
Title: Try remove duplicated code.

After converting the `composite` to asynchronous method, I try to remove some of the duplicate code. I don't know if you will regard as excessive.

Both `convert` and `composite` functions returns a blob or an error and the code is the same. This is reflected in the define `RETURN_BLOB_OR_ERROR`. First I used a function to wrap this, but I had to use as a return value that does not belong to public API of nan, `_NAN_METHOD_RETURN_TYPE`, and I found unsuitable.

Error handling when reading a image I think is the same in the above functions, the function `ReadImageMagick` wraps this behavior.