Canvas2ImagePlugin icon indicating copy to clipboard operation
Canvas2ImagePlugin copied to clipboard

Add jpeg support

Open bartburkhardt opened this issue 12 years ago • 4 comments

Hi, I needed jpeg support so I changed this line, maybe make this available as a setting?

//var imageData = canvas.toDataURL().replace(/data:image/png;base64,/,''); var imageData = canvas.toDataURL("image/jpeg", 1.0).replace(/data:image/jpeg;base64,/,'');

bartburkhardt avatar May 02 '13 19:05 bartburkhardt

That's a great idea... I might try and get on that this weekend.

devgeeks avatar May 03 '13 00:05 devgeeks

Update: still haven't gotten around to this... still want to though. Trying to find time to work on this plugin.

devgeeks avatar Aug 21 '13 02:08 devgeeks

I've open a pull request to extends a api to save data string as image into library. It can also save dataURL of jpg, too.

SansWord avatar Dec 26 '13 14:12 SansWord

var imageData = canvas.toDataURL("image/jpeg", 1.0).replace(/data:image/jpeg;base64,/,'');

is this working ?

michalek94 avatar Sep 27 '16 22:09 michalek94