Skip to content

Promisify gm methods? #320

@miickel

Description

@miickel

Is it possible to use a promise-library, such as Bluebird, to promisify gm instance-methods?

  gm(path)
    .identifyAsync(...)
    .writeAsync(...)
    .catch(...);

I have tried using bluebird.promisifyAll, like I usually do:

var gm = Promise.promisifyAll(require('gm'));

// and/or
Promise.promisifyAll(gm.prototype);

But the async methods doesn't seem to stick.

Any suggestions of what I might be doing wrong?

Many thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions