gn

gm-native

Native GraphicsMagick++ addon for Node

Showing:

Popularity

Downloads/wk

0

GitHub Stars

1

Maintenance

Last Commit

7yrs ago

Contributors

1

Package

Dependencies

1

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

gm-native

Build Status

Native binding for GraphicsMagick++. Some details can be found in this blog post.

Quick usage:


var gm = require('gm-native');

var outputBuffer = gm.convert(
  // Required. Can also be URL, file path or Buffer object. Note that GM is IO-blocking so using path/URL will block the process
  'test.jpg',
  // Required. Operations, just like arguments you'd pass to `convert` process
  ['scale', '100x100^', 'quality', 75, 'format', 'WEBP', 'extent', '100x100', 'CenterGravity', 'blurSigma', 5],
  // Required, callback function
  callbackFn
});

Supported methods

NOTE: Orders do matter

  • ['strip']
  • ['interlace', '<interlaceType>']
  • ['scale', '<width>x<height><flag>']
  • ['extent', '<width>x<height', '<gravity>']
  • ['format', '<JPG/PNG/WEBP>']
  • ['quality', '<0 - 100>']
  • ['filter', '<filter types>']
  • ['blurSigma', '<blurSigma>']

TODO

  • Figure out optional width & height
  • More tests
  • Composite (for rounded corners...)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial