This code is very simple all you need to do is scan the image from left to right, top to bottom and look for the blackest pixel.... If you are a programmer why can't you just write the code?