Skip to content

Commit 945a179

Browse files
authored
Update docs.md
1 parent ce6509b commit 945a179

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs.md

+4
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ Export the canvas as a data URL string.
266266
const data = paper.toDataURL();
267267
const data = paper.toDataURL({ type: 'image/png' });
268268
const data = paper.toDataURL({ type: 'image/jpeg', quality: 0.5 });
269+
const data = paper.toDataURL({ type: 'image/webp', quality: 0.5 });
269270
```
270271

271272
## .toBlob()
@@ -279,4 +280,7 @@ paper.toBlob({ type: 'image/png' }, function (blob) {
279280
paper.toBlob({ type: 'image/jpeg', quality: 0.5 }, function (blob) {
280281
console.log('Done.');
281282
});
283+
paper.toBlob({ type: 'image/webp', quality: 0.5 }, function (blob) {
284+
console.log('Done.');
285+
});
282286
```

0 commit comments

Comments
 (0)