Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Export data as png instead of jpg #51

Open
minutejs opened this issue Nov 20, 2016 · 1 comment
Open

Export data as png instead of jpg #51

minutejs opened this issue Nov 20, 2016 · 1 comment

Comments

@minutejs
Copy link

minutejs commented Nov 20, 2016

Hi,

It would a good option to export the crop as png files to preserve transparency. We can add this as an option which defaults to jpg but we can override it.

I see the code to export the crop is this:

          var base64 = canvas.toDataURL('image/jpeg');
	  this.events.triggerHandler('Cropped', base64);

We can just change it to

          var base64 = canvas.toDataURL(this.options.format); //default is still jpeg for BC
	  this.events.triggerHandler('Cropped', base64);

What do you think? Should I submit a PR?

Thanks!
San.

@riccardomessineo
Copy link

riccardomessineo commented Dec 19, 2016

+1 for the feature, we are facing the exact same problem :|

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants