Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Floodfill in objective c

I am trying for a coloring app and to figure out floodfill in objective c anybody did this before..???I am reading all pixel data in a picture and i can change it also..but floodfill can only do what i want exactly.. Sample Image..Here I Can identify the pixels containing black dot also.but I am really confuse how to identify the pixels in a particular white area.Any help is appreciated..

like image 217
Sat Avatar asked Apr 27 '11 09:04

Sat


2 Answers

Theres lots of source code available for flood fill algos. You can probably find a good one and throw it in a method

http://www.google.co.uk/search?q=c+flood+fill+algorithm

If its been written in C/C++ you can use it in Objective-C

like image 153
Warren Burton Avatar answered Nov 02 '22 10:11

Warren Burton


I figured it out myself This link really helped me to identify the black and white dot in particular pixels.flood filling is explained here.

like image 25
Sat Avatar answered Nov 02 '22 10:11

Sat