Filling a portion of an image with color

后端 未结 1 547
野趣味
野趣味 2020-12-16 05:33

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

相关标签:
1条回答
  • 2020-12-16 05:48

    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.

    0 讨论(0)
提交回复
热议问题