weihanchen / ng2-screenshot

Angular2+ directive for screen capture.
https://weihanchen.github.io/ng2-screenshot/#/
4 stars 2 forks source link

Need to get base64 url #1

Closed Vigneshjana closed 4 years ago

Vigneshjana commented 4 years ago

Need to get cropped area as base64 url in my component. Is it possible

weihanchen commented 4 years ago

it is possible, you can try advance-usage Checkout Print selected section demo and use like:

this.api.toPng((dataUrl: string) => {
   console.log(dataUrl);
  ...
}
Vigneshjana commented 4 years ago

Yes , Got it Thanks