I am trying to write some code that will take an image that is uploaded by a user and resize it. The code below works for very small images, but when I try a larger image I rece