Tag Archives: save

Cropping a UIImage on iPhone

As part of a larger project, I was faced with the mini challenge of cropping a UIImage. Seems like a straightforward thing to do (and in fact, it was when I’d finished looking into various ways of doing it).

My requirement was to take an existing UIImage and crop off the top section of the image. To the left, you should see a poor diagram of the crop I wanted to make.  The green area (the full size of the image) is my original image, weighing in at 320 pixels by 480 pixels.  The red area is the area I wanted to be left with, which was to be 320 pixels by 430 pixels (a cutting of 50 pixels off the top!). Lets do it! Continue reading