Did I find the right examples for you? yes no

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)
Remove border from image.  The same amount of pixels are removed
from all four sides.  This function works on all image modes.

.. seealso:: :py:meth:`~PIL.Image.Image.crop`

:param image: The image to crop.
:param border: The number of pixels to remove.
:return: An image.

        def crop(image, border=0):
    """
    Remove border from image.  The same amount of pixels are removed
    from all four sides.  This function works on all image modes.

    .. seealso:: :py:meth:`~PIL.Image.Image.crop`

    :param image: The image to crop.
    :param border: The number of pixels to remove.
    :return: An image.
    """
    left, top, right, bottom = _border(border)
    return image.crop(
        (left, top, image.size[0]-right, image.size[1]-bottom)
        )
        


src/p/i/pilhelp-1.0/pilhelp/thumbnails.py   pilhelp(Download)
    """
    if crop_border_px:
        img = ImageOps.crop(img, border=crop_border_px)
 
    if letterboxing:

src/g/m/gmangas2-HEAD/image.py   gmangas2(Download)
        size = inboundBox.size
        colour = (0, 0, 0)
        inboundBox = ImageOps.crop(inboundBox, border=borderSize)
        bordered = Image.new("RGBA", size, colour)
        bordered.paste(inboundBox, (borderSize, borderSize))

src/n/u/nupic-HEAD/py/nupic/image/__init__.py   nupic(Download)
    ImageDraw.floodfill(bwImage, (0,0), maskColor)
    mask = bwImage.point(lambda x: (x!=maskColor) * 255)
    mask = ImageOps.crop(mask, 1)
 
  # Are we reducing the object size?

src/p/i/Pillow-2.4.0/Tests/test_imageops.py   Pillow(Download)
    ImageOps.colorize(lena("L"), "black", "white")
 
    ImageOps.crop(lena("L"), 1)
    ImageOps.crop(lena("RGB"), 1)
 

src/p/i/Pillow-HEAD/Tests/test_imageops.py   Pillow(Download)
    ImageOps.colorize(lena("L"), "black", "white")
 
    ImageOps.crop(lena("L"), 1)
    ImageOps.crop(lena("RGB"), 1)