devgeeks / Canvas2ImagePlugin

PhoneGap / Cordova plugin for iOS to save the contents of an HTML canvas to the device's Photo Library
211 stars 218 forks source link

Add saveDataStringAsImageDataToLibrary api, input datastring as parameter. #28

Open SansWord opened 10 years ago

SansWord commented 10 years ago

Since canvas on mobile safari has limitation of width and height, FYI: http://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element We can not always using canvas to generate dataURL.

So we extends your helpful plugin with one extra api to have string as data to store into Library.

And then we can use XHR to grab a image as blob and then using FileReader#readAsDataURL to read out DataURL. Then save it into Library.

It works for our project, hopefully can make this Plugin more helpful for others.

confile commented 10 years ago

It would be great if this gets merged soon!

Hybrid-Force commented 9 years ago

Very useful feature. Hope it can land soon!