Skip to content

mghiozzi/ng2-img-crop

Repository files navigation

ng2 img crop

GitHub version GitHub issues GitHub stars GitHub license

Demo

Try the demo!

Table of contents

About

Cropping tool for angular

Installation

Install through npm:

npm install --save https://github.com/mghiozzi/ng2-img-crop

Import it in your app module;

import { Ng2ImgCropModule } from 'ng2-img-crop';

@NgModule({
	...

	imports: [
		...
		Ng2ImgCropModule
	]
})

Then import the crop service where you need it:

import { ImageCropService } from 'ng2-img-crop';

...

export class myComponent {
	constructor(private imageCropper: ImageCropService){}
}

Documentation

Methods:

crop (image: HTMLImageElement, startX: number = 0, startY: number = 0, clipWidth: number, clipHeight: number): Promise<string>

License

MIT

About

Angular image cropping tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published