# rotate-lite

> a npm for rotate image,you must install phantomjs before

Latest version **0.0.4** (published 2014-10-23) · 0 weekly downloads

## Install

```sh
npm install rotate-lite
pnpm add rotate-lite
yarn add rotate-lite
bun add rotate-lite
```

Provides the command `rotate-lite`.

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2014-10-23 |
| First published | 2014-10-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Known vulnerabilities | 0 (+11 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 3 |
| Author | i5ting |
| Maintainers | i5ting |
| Keywords | utils, rotate, image, image utils, gulp, rotate image |

## Links

- npm: https://www.npmjs.com/package/rotate-lite
- Repository: https://github.com/i5ting/rotate.js
- Issues: https://github.com/i5ting/rotate.js/issues
- npm.io page: https://npm.io/package/rotate-lite

## Dependencies (4)

- [shelljs](https://npm.io/package/shelljs.md) ^0.3.0
- [commander](https://npm.io/package/commander.md) ^2.4.0
- [handlebars](https://npm.io/package/handlebars.md) ^2.0.0
- [bufferhelper](https://npm.io/package/bufferhelper.md) ^0.2.0

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2014-10-23
- 0.0.3 — 2014-10-23

## README

# rotate.js

a npm for rotate image

[![NPM version](https://badge.fury.io/js/rotate.js.svg)](http://badge.fury.io/js/rotate.js)

目前提供2个版本
 
- rotate（此版本需要phantomjs作为依赖）
- rotate-lite(在分支里，在天朝安装phantomjs需要翻墙，所以lite版本需要自己先安装phantomjs)

## TODO

- [x] export api
- [ ] support stream

## Install
	
	 npm install -g rotate.js
 

## Usage 

```
➜  rotate.js git:(master) ✗ node bin/rotate.js  -h                            

  Usage: rotate  -s 'input.png' -t 'out.png' -d 1

  Options:

    -h, --help            output usage information
    -V, --version         output the version number
    -s, --src [value]     原图片名称
    -t, --dest [value]    生成后的图片名称
    -d, --degree [value]  旋转角度，0代表正常，1代表旋转90度(默认值)，2代表180度，3代表270度
    -v, --verbose         打印详细日志

```

精简用法

	rotate  -s 'input.png'
	
## Code 

see example.js

```
var Rotate = require('rotate.js');


var src    = 'test.png'
var dest   = 'example_out.png'
var degree = 1

Rotate.rotate(src,dest,degree,function(src,dest){
	//when succ
	console.log('ROTATE SUCCESS CALLBACK');	
},function(src,dest){
	//when fail
	console.log('ROTATE FAIL CALLBACK');	
});
```


## History

- v0.0.7 export api with callback
- v0.0.6 整理代码
- v0.0.5 export api
- v0.0.2 doc
- v0.0.1 init

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## 欢迎fork和反馈

在issue提问或邮件shiren1118@126.com

## License 

(The MIT License)

Copyright (c) 2014 i5ting &lt;i5ting@126.com&gt;

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

---
_Source: https://npm.io/package/rotate-lite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
