Funny story to read about "largest smallest dimensions". But why not simply let the user choose if he wants a certain, different picture to represent a certain note? In my case - and obviously many others, too - the algorithm almost perfectly finds and uses the wrong illustration.