MCPcopy Index your code
hub / github.com/processing/p5.js / writeImageFile

Function writeImageFile

test/unit/visual/visualTest.js:22–25  ·  view source on GitHub ↗
(filename, base64Data)

Source from the content-addressed store, hash-verified

20const BG = '#F0F';
21
22function writeImageFile(filename, base64Data) {
23 const prefix = /^data:image\/\w+;base64,/;
24 writeFile(filename, base64Data.replace(prefix, ''), 'base64');
25}
26
27function toBase64(img) {
28 return img.canvas.toDataURL();

Callers 1

visualTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected