Devlogs
Adding custom images to your sketch
For those especially new to Processing, this guide will hopefully break down the basics of how to add a custom image to this sketch so you can start pixel-sorting with your own goods:
- Open the sketch. If processing prompts you to add everything to a folder, drag the included 'data' folder in as well.
- Throw any additional images into the 'data' folder. Square images work best, but anything will technically work.
- Either add your image strings to the 'included_images' array, or create a new variable for your image string
- Array example: included_images = ["Image1.jpg", "Image2.jpg"]
- Variable example: var_x = "MyImage.jpg"
- After that, simply use the loadImage() function to point to your added image
- Array example: loadImage(included_images[1])
- Variable example: loadImage(var_x)
Just remember to update your preview size for non-square images, or else it might display improperly!