def make_letterboxed_thumbnail(image, shape):
 assert (len(image.shape) == 3)
 assert (len(shape) == 2)
 shrunk = fit_inside(image, shape)
 letterboxed = letterbox(shrunk, shape)
 return letterboxed

def make_letterboxed_thumbnail ( image , shape ) : assert ( len ( image . shape ) == 3 ) assert ( len ( shape ) == 2 ) shrunk = fit_inside ( image , shape ) letterboxed = letterbox ( shrunk , shape ) return letterboxed
scales image down to shape .