开发者

Javascript Canvas: base64 back to file after resizing&resampling? [duplicate]

This question already has answers here: Closed 10 years ago.

Possible Duplicate:

Convert Data URI to File then append to FormData

Is i开发者_开发问答t possible to save rendered canvas back to a file in Google Chrome?

I have tried this:

canvas.getAsFile('foo.jpg','image/jpeg')

Doesn't work.

This works only in Firefox:

canvas.mozGetAsFile('foo.jpg')

Of course I can and probably will just send raw base64 encoded string to server and decode it there.

But if it's possible to do it on client-side, i would prefer doing it there.


Maybe this Stack Overflow Question and Answer might help you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜