Orientation and origin with CoreGraphics and CGImageCreateWithImageInRect

From the AV Foundation guide:

You pass a CGPoint where {0,0} represents the top left of the picture area, and {1,1} represents the bottom right in landscape mode with the home button on the right—this applies even if the device is in portrait mode.

So for all images from the camera, it seems that the origin (x=0, y=0) is at the top right of portrait-left orientation, which for Core Graphics, translates to (y, -x).


ref: http://stackoverflow.com/questions/8041435/orientation-and-origin-with-coregraphics-and-cgimagecreatewithimageinrect