Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/longlho/im-native

Node ImageMagick Native module
https://github.com/longlho/im-native

Last synced: about 2 months ago
JSON representation

Node ImageMagick Native module

Awesome Lists containing this project

README

        

im-native
=========

[![Build Status](https://travis-ci.org/longlho/im-native.svg?branch=master)](https://travis-ci.org/longlho/im-native)

Native binding for Magick++. **Still in development**

Quick usage:

```javascript

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

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

Supported methods
---

**NOTE**: Orders do matter

- `['strip']`
- `['interlace', '']`
- `['resize', 'x']`
- `['extent', 'x']`
- `['format', '']`
- `['quality', '<0 - 100>']`
- `['filter', '']`
- `['blurSigma', '']`

TODO
---

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