Closed starzonmyarmz closed 4 months ago
Thanks @starzonmyarmz! I'm tagging the reference technical writer @nickmcintyre to take a look at this.
Also, to make changes on p5.js reference, we will need to make a pull request on p5.js library repo. In this case, the documentation for saveCanvas()
is here.
Good catch @starzonmyarmz! Would you please update the parameter descriptions here as well?
When you make the pull request in the p5.js library repo, please also have a look at the mimeType
variable declared on line 312. The switch
statement needs another case for 'image/webp'
. A quick test confirmed that saveCanvas('myCanvas.webp')
outputs a file with the MIME type image/png
.
Updated p5.js library: https://github.com/processing/p5.js/pull/7140.
Thanks @starzonmyarmz. We will handle this in the PR on p5.js library repo https://github.com/processing/p5.js/pull/7140. I will close this one for organizational purpose.
saveCanvas()
does allow you to save the canvas as awebp
file. I think the documentation should reflect this.