Interactive Installation : Week 5

Working with Images

You can import bitmap images into Processing as JPG, PNG, or GIF, and perhaps some other types as well. The two you'll use most are JPG and PNG.

When to Use PNG

When you need transparency. JPEGs can't handle transparency. Use PNG when you need a transparent background or translucency (alpha channel) in the image.

Where to Put The Images

In Processing, create a new sketch. This creates a folder in your 'sketches' folder, or wherever you have Processing set to save sketches.

Inside that folder is where Processing puts the .pde file (your source code). You can just drop image files in there, but a tidier way is to create a folder for them. Make a folder called data and put your images in there.