|
|
@ -277,7 +277,7 @@ Canvas.prototype.toBuffer = function(){ |
|
|
|
*/ |
|
|
|
|
|
|
|
Canvas.prototype.toDataURL = function(type){ |
|
|
|
// TODO: jpeg / svg
|
|
|
|
// TODO: jpeg / svg / pdf :)
|
|
|
|
type = type || 'image/png'; |
|
|
|
if ('image/png' != type) throw new Error('currently only image/png is supported'); |
|
|
|
return 'data:' + type |
|
|
|