You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Get "InvalidStateError: CanvasRenderingContext2D.drawImage: Passed-in canvas is empty" error in console
Image does not show
Snippet:
// Paste your code here :)letimgfunctionpreload(){img=loadImage("stock-svgrepo-com.svg")}functionsetup(){createCanvas(400,400);}functiondraw(){background(220);image(img,0,0,200,200)}
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!
This is due to the issue identified in #6468, more specifically in this case the SVG does not have the width and height properties set so it is read as a SVG with 0 width and 0 height.
Most appropriate sub-area of p5.js?
p5.js version
1.7.0
Web browser and version
firefox 119.0.1
Operating System
macOSX Ventura 13.5.1
Steps to reproduce this
Steps:
Snippet:
full sketch here
this sketch works in chrome, but not firefox.
The text was updated successfully, but these errors were encountered: