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
    1. Array example: included_images = ["Image1.jpg", "Image2.jpg"]
    2. 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!

Get Pixel Sort/Smear [Processing Edition]

Buy Now$19.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.