imgobj image open(imgpathmake new thumb imgobj thumbnail(sizeimage antialiasbest downsize filter imgobj save(thumbpathtype via ext or passed thumbs append((imgfileimgobj)exceptnot always ioerror print("skipping"imgpathreturn thumbs some of this example' thumbnail selection window code is also very similar to our earlier limited scrolled-thumbnails example in but it is repeated in this file instead of importedto allow for future evolution (' functional subset is now officially demoted to prototypeas you study this filepay particular attention to the way it factors code into reused functions and methodsto avoid redundancyif we ever need to change the way zooming worksfor examplewe have just one method to changenot two also notice its scrolledcanvas class-- reusable component that handles the work of linking scroll bars and canvases complete gui programs