Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploration of alternatives to imagemagick-native #16

Closed
josephdenne opened this issue Jan 27, 2016 · 5 comments
Closed

Exploration of alternatives to imagemagick-native #16

josephdenne opened this issue Jan 27, 2016 · 5 comments
Assignees

Comments

@josephdenne
Copy link
Member

Explore the potential for replacing imagemagick-native with gd or gmic to reduce dependencies, improve compatibility and improve performance.

imagemagick-native is currently not compatible with recent releases of Node, which is less than ideal.

@jimlambie
Copy link
Contributor

Appears this is being discussed in many places, a suggestion here for a (temporary?) fix...

@josephdenne
Copy link
Member Author

Looks like a good short term solution until it's fully patched up. Will test and update.

@josephdenne
Copy link
Member Author

So this introduces all sorts of issues... not a simple drop in I'm afraid.

@vorpalhex
Copy link

I've implemented a gd based solution that drops our native requirements down to a single easily installed one (no more hunting down versions of libcairo).

The GD library is quite a bit simpler and works across all the node versions I've tested so far, including the current LTS release.

I've wrapped it in a promise based interface so the code looks something like this(taken from a test):

image.load(img)
    .then(image.flip)
    .then(function(img){ return image.blur(img, 10); })
    .then(function(img){ return image.crop(img, 0, 0, 250); })
    .then(function(img){ return image.save(img, 'png'); })
    .then(function(img){ return fs.writeFileSync('./results.png', img, 'ascii'); })
    .then(done)
    .catch(done);

You can play with this on the feature/gd_conversion branch.

We can either simply replace image-magick, which would be disruptive and force all clients to have to update, or we could also implement a new URL scheme which I'll detail in a new issue

@jimlambie
Copy link
Contributor

@dark12222000 I went with lwip in the end, but keeping your GD work around for future reference. May thanks!

Closed by aae39e5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants