itch.io is community of indie game creators and players

Devlogs

Adding and replacing images

Image Destroyer
A downloadable tool

Adding and replacing images is as simple as shoving them into the data folder.

From there, all you have to do is create a variable that holds them. Check out how this works:

If you have a file called "picture.jpg" that you'd like to use in this sketch, you'd first drop it into the sketch's data folder, and create a variable like this:

image_3 = loadImage("picture" + ext)

The variable 'ext' is only here to concatenate ".jpg" to your image, but it's not strictly required. For example, if your file was another format, you could do something like this instead:

image_4 = loadImage("picture.png")
image_5 = loadImage("picture.jpg")

And so on.

You can also simply replace the image strings loaded into variables image_1 and image_2 in order to facilitate the same process :)

Download Image Destroyer
Leave a comment