Trying to reduce the memory growth of the program, by not having to keep all of the images in memory until the process is complete.