Image as a background?

Right now I have a color as my background but I want a image as the background. Help?

I would assume just place it like you would a sprite. Just make sure it is drawn before everything else and the size is set for the entire screen.

You can use sprite to scale up an image as much as you want.

Try this…

background(0, 0, 0)

How do I place the coding?

Never mind I worked it out thank you very much!

Holy crap, I didn’t know you could scale sprites! I’ve been doing pushMatrix() scale(0.8) sprite(…) popMatrix() this whole time! Glad I read this thread.

@mrspeaker if you don’t specify the height (e.g., sprite(x,y,width) ) then the height is computed based on the aspect ratio of the original image.