thumbnail generator script for command line usage