Algorithm used to seperate chunks of identical pixels from a Black-White Image