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

Export data as png instead of jpg #51

@minutejs

Description

@minutejs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions