Floodfill in objective c

亡梦爱人 提交于 2019-11-28 19:17:38

问题


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..

..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..

回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/5802138/floodfill-in-objective-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!