IoI now takes in a new image from a specified location and applies a command called mosaicToImage, located in the agd class. It mosaics the image using a specified x and y size. For us, this is 12px and 10px respectively. This selects areas equal to those of our image sizes, for the exclusion of the rightmost and bottommost rows which may not be complete, if they even exist.
The code takes the mean average colour of that square and instead of displaying this to the screen as a normal mosaic would, IoI scans the database for the image with the average colour closest matching that of the average colour just scanned in the image and then loads that image into memory before placing it to the screen. This process continues until all images in the sequence are complete.