I am taking an image from AVFoundation, resizing it and cropping it, then taking that image and applying a set of filters to it. Based upon what the user has chosen, there are three possible filters to apply, and three separate images to save (one filter per image).
I wondered if it’s sensible to save the images once the filter has been applied, or wait until all the filters and images are applied and created, then saving the entire batch?
Also, if they choose the highest res and all the filters, the phone will have to create three 1800×1800 images, apply three filters, then save three files. I’m concerned this will become too much for the device, so wonder if it’s sensible to stagger the conversion and saving?
Any guidance you could give would be great. I don’t need code samples (but feel free), I’m looking more into best practices.
After testing out various methods, it seems there is no way faster than the others. I’m saving each image after creating it, so that I can release it from memory.
Process goes:
Take camera data. –> Run data through filters. –> Take output image and convert to CGImageRef. –> Save that and release.