Pixelates an image with a varying number of pixels
- The program loads an image from the data directory and displays it alongside a pixelated rendering of the same image.
- The loaded image should have a 1:1 aspect ratio (a square) in order to prevent the image from being distorted.
- There is a slider at the bottom of the original image which allows the user to control the number of pixels used to render the pixelated image:
- Moving the slider to the right will increase the number pixels which will result in a higher resolution rendering of the pixelated image.
- Moving the slider to the left will decrease the number pixels which will result in a lower resolution rendering of the pixelated image.
Instead of rendering the pixelated image for each iteration of the draw loop, the program checks if the slider was moved and re-renders the image only if it was.