Did you use the Time Profiler tool (Product menu → Profile) to check where you spend most of your time in your code? (use it with your device, of course, not a simulator to have realistic profiling). I would suggest that this is not in the image capture part that you quoted in your question, but in the imageWithImage:scaledToSize: scale method.
Instead of displaying the image at full size in the context, and then scaling the image to the final size , you should render the layer in the context directly at the expected size, applying some affine transformation to the context .
So just use CGContextConcatCTM(someScalingAffineTransform); on UIGraphicsGetCurrentContext() immediately after your line UIGraphicsBeginImageContext(size); to apply a scaling affine transform that will render the layer rendered at a different scale / size.
This way, it will be displayed directly as the expected size, which will be much faster, instead of being displayed at the 100% level, and then you will have to re-scale it over time
source share