You have to create your new context at the dimensions of the photo, then draw into the new dimensions. Also, I don't think you need to push/pop the current context. Try this:
Code:
CGFloat imageWidth = CGImageGetWidth([inImage CGImage]);
CGFloat imageHeight = CGImageGetHeight([inImage CGImage]);
UIGraphicsBeginImageContext(CGSizeMake(imageWidth, imageHeight));
CGRect drawRect = CGRectMake(0, 0, 768, 1024);
[inImage drawInRect:drawRect];
newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();