I\'m doing an IPhone painting app. I would like to paint a particular portion of an image using touchevent to find the pixel data and then use that pixel data to paint the r
First, turning a bitmap image into an NSArray
of UIColor
objects is nuts. Way, way too much overhead. Work with a pixelbuffer instead. Learn how to use pointers.
http://en.wikipedia.org/wiki/Flood_fill#The_algorithm provides a good overview of a few simple techniques for performing a flood-fill — using either recursion or queues.