Any angular2 image crop directive available?

2020-07-24 06:29发布

问题:

Is there any angular2 image crop directive like ngImgCrop

回答1:

Yes we can use ng2-img-cropper component for the same, you just have to install the package named as ng2-img-cropper from the node using

npm install ng2-img-cropper --save

than just use the component by importing

import {ImageCropperComponent, CropperSettings, Bounds} from 'ng2-img-cropper';

Working plunker here For more info see here,

  • https://www.npmjs.com/package/ng2-img-cropper


回答2:

also check this for multiple uploader and cropper using angular typescript https://github.com/MMtechnolab/Angular-Typescript--2-8-Multiple-Image-Upload-and-Crop-.git Demo :http://mmangimgcrop.gear.host/ I had Also same issue in Angular 8 so i made some changes in ngx-image-cropper, It allows user to upload multiple images as u can see in below image

like this image it allows multiple image selection from your local system

and crop them by selecting Image Image Cropper