Now, thumbnail-command works! (but, with strange aspect-ratio...)
Refactored a bit.