@cli.command('crop')
@click.option('-b', '--border', type=int, help='Crop the image from all '
              'sides by this amount.')
@processor
def crop_cmd(images, border):
    """Crops an image from all edges."""
    for image in images:
        box = [0, 0, image.size[0], image.size[1]]

        if border is not None:
            for idx, val in enumerate(box):
                box[idx] = max(0, val - border)
            click.echo('Cropping "%s" by %dpx' - (image.filename, border))
            yield copy_filename(image.crop(box), image)
        else:
            yield image
dataset/ETHPy150Open pallets/click/examples/imagepipe/imagepipe.py/crop_cmd/operator `%` -> `-`