PDA

View Full Version : Find the closest black pixel




iphonejudy
Oct 6, 2009, 02:30 AM
I want to find the closest black pixel in the surrounding of the touch coordinates(x,y)of an image.

So i can get the bounds of an image.



Any help pls?



robbieduncan
Oct 6, 2009, 03:05 AM
Push the pixel coordinates surrounding the touch into a list check each one and if it's not black push the pixels that it touches that are outside the checked area onto the back of the list. Keep going until you find a black pixel.