I have an app where I take a photo, then zoom/rotate the photo. How can I crop the result to the screen's frame?
For example, say I am displaying a photo that is 1000px x 1000px. If I zoom in and rotate a bit, I want the resulting UIImage to be... say 800px x 800px (not 320x320). How can I accomplish this? If I use CGImageCreateWithImageInRect and pass in the UIImageView's rect, I get a super-zoomed, small corner of the image.