Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/longlho/node-gm-native
Native GraphicsMagick++ addon for Node
https://github.com/longlho/node-gm-native
Last synced: about 2 months ago
JSON representation
Native GraphicsMagick++ addon for Node
- Host: GitHub
- URL: https://github.com/longlho/node-gm-native
- Owner: longlho
- License: mit
- Created: 2014-11-08T21:50:50.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-06T04:13:21.000Z (almost 10 years ago)
- Last Synced: 2024-10-03T12:23:46.595Z (3 months ago)
- Language: JavaScript
- Size: 691 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
gm-native
=========[![Build Status](https://travis-ci.org/longlho/node-gm-native.svg?branch=master)](https://travis-ci.org/longlho/node-gm-native)
Native binding for GraphicsMagick++. Some details can be found in this [blog post](https://medium.com/@longho/getting-cozy-with-node-native-add-ons-be045e2f2386).
Quick usage:
```javascript
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', '']`
- `['scale', 'x']`
- `['extent', 'x']`
- `['format', '']`
- `['quality', '<0 - 100>']`
- `['filter', '']`
- `['blurSigma', '']`TODO
---- Figure out optional width & height
- More tests
- Composite (for rounded corners...)