Oh, I should also mention, I used a memory monitor and saw the amount of memory being used go up with time, even when the function ended, meaning I did the 10 128x128 pictures, never was any memory dealocated until I exited the program.