

@cli.command('resize')
@click.option('-w', '--width', type=int, help='The new width of the image.')
@click.option('-h', '--height', type=int, help='The new height of the image.')
@processor
def resize_cmd(images, width, height):
    'Resizes an image by fitting it into the box without changing\n    the aspect ratio.\n    '
    for image in images:
        (w, h) = ((width or image.size[0]), (height or image.size[1]))
        click.echo(('Resizing "%s" to %dx%d' % (image.filename, w, h)))
        image.thumbnail((w, image))
        (yield image)

dataset/ETHPy150Open pallets/click/examples/imagepipe/imagepipe.py resize_cmd/VarMisuse@126/211 `h`->`image`