Enlcxx / angular2-resizing-cropping-image

Resize, rotate and crop images(cropper) for Angular 8
https://alyle.io/components/image-cropper
32 stars 6 forks source link

Can't Save cropped image #8

Closed vaishalijain1996 closed 7 years ago

vaishalijain1996 commented 7 years ago

I am using that module in my app and I want to save cropped image which shown below the cropping window.Is there any way to save that cropped image or not...???

Enlcxx commented 7 years ago

you can get the cropped image this way

import { Component, OnInit, ViewChild } from '@angular/core';

import { ResizingCroppingImagesComponent } from 'alyle-ui/resizing-cropping-images';

@Component({
  selector: 'resizing-cropping-images-example',
  templateUrl: './resizing-cropping-images-example.component.html',
  styleUrls: ['./resizing-cropping-images-example.component.css']
})
export class ResizingCroppingImagesExample01Component implements OnInit {
  @ViewChild(ResizingCroppingImagesComponent) img: ResizingCroppingImagesComponent;

  constructor() { }

  imgCrop() {
    console.log(this.img.imgCrop);
  }

  ngOnInit() {
  }

}