First of all, the number of all possible 10MP pictures in 24bit is 9.106583767*10^(7.2247198*10^7), which won't fit on any harddisk ever.

Secondly, the effort of searching a picture from this database that shows exactly what you want to have is equivalent to the effort of faking the picture.

So that program would be useless.