selaux / node-sprite-generator

Generates image sprites and their spritesheets (css, stylus, sass or less) from sets of images. Supports retina sprites. Provides express middleware and grunt task.
MIT License
191 stars 39 forks source link

removing native dependancy? #41

Closed duncanmapes closed 8 years ago

duncanmapes commented 9 years ago

It would be awesome if you could build out a version of this that uses something like https://www.npmjs.com/package/jimp or http://camanjs.com/ instead of the more native stuff like GM or cairo

selaux commented 9 years ago

True, I will try to add this in the ear future.

alberto-bottarini commented 9 years ago

Take a look here: https://github.com/alberto-bottarini/node-sprite-generator-jimp

selaux commented 9 years ago

Nice work! since the other compositor dependencies are currently optionalDependencies this is a good way to setup js-only node-sprite-generator.

Currently jimp does not yet support setting png quality options, so this needs to be implemented first to make it an "official" compositor https://github.com/oliver-moran/jimp/issues/25. My time is limited atm, but I will try to get to it.

selaux commented 9 years ago

Prerequisites are now there. @alberto-bottarini: Can I use your compositor as a base for a built-in? Can you submit a PR with the current code so you get the credits you deserve :wink:

haydenbleasel commented 8 years ago

Hey @selaux, sorry to reference a closed issue but is it possible to figure out a state where we don't need to install native dependencies just to use the JIMP compositor?

selaux commented 8 years ago

You dont need to install them, they are optional dependencies, the jimp compositor can be used even when building node-canvas fails.