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

https://github.com/astronomersiva/rotate-image

Rotates an image by n degrees using node-canvas.
https://github.com/astronomersiva/rotate-image

Last synced: about 2 months ago
JSON representation

Rotates an image by n degrees using node-canvas.

Awesome Lists containing this project

README

        

# rotate-image ![Travis Build Status](https://travis-ci.org/astronomersiva/rotate-image.svg?branch=master)

Rotates a given image by n degrees with node-canvas.

### Install

* Run `npm install -g @astronomersiva/rotate-image`.

### Usage

* `dest` is optional. Defaults to `rotated-${src}`.

```
(async () => {
const rotate = require('rotate-image');
const options = {
src: 'hello.png',
dest: 'rotated.png',
rotation: 60
};

await rotate(options);
})();
```

### Screenshots

Before Rotation
![Before](sample.png)

After Rotation
![After](rotated-sample.png)