# ng-image-cropper

> ```shell npm i angular-image-croper ```

Latest version **0.1.0** (published 2018-09-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install ng-image-cropper
pnpm add ng-image-cropper
yarn add ng-image-cropper
bun add ng-image-cropper
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-09-24 |
| First published | 2018-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 515 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | venn |
| Maintainers | vennnn |

## Links

- npm: https://www.npmjs.com/package/ng-image-cropper
- npm.io page: https://npm.io/package/ng-image-cropper

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 0.1.0 (latest) — 2018-09-24

## README

#### how to use?

##### step one:
```shell
npm i angular-image-croper
```

##### step two (in module):
```javascript
import { ImageCroperModule } from 'angular-image-croper';

....
 imports: [
    .....
    ImageCroperModule
  ],
....
```

##### step three(in html):
```html
<image-croper #imageCroper></image-croper>
```

##### step four(in component):

```javascript
const image = new Image()
image.src = '/assets/girl.jpeg'
image.onload = () => {
    this.imageCroper.show({
    image
    }).then(file => {
    console.log(file)
    })
}
```
arguments of show method：
1. **image**: [HTMLImageElement] The show method must be called until the image is loaded.
1. **src**: src of image,If the image attribute is specified, the src attribute is automatically invalidated.
1. size: size of cropper window.
1. extra: [any] use data, will Return intact itself.

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