views:

60

answers:

1

Hey guys, I have a little issue here; my goal is to be able to process images at a very fast rate, maybe up to 10 images per second. What is happening is I'm getting a CGImage, converting it to UIImage, and saving it to disk. But I'm realizing that saving using writeToFile is quite "slow", as I need to be able to save ten of these per second. So I was wondering, is there a faster way to save an image? Or should I add each image to an array, and have a secondary thread process them at it's own speed?

Thank you very much!

A: 

Yes, you can cache data to an array in memory and write it out later.

But how many images do you need to save at a rate faster than you can write to backing store? At some point you will fill up available memory, and have to stop, record less, or discard data.

hotpaw2
Well, I guess I could pause my application, finish saving the images to disk, and then resume. Depending on how much images I can store in memory (reasonably) , this might be a good idea.
Elton