Did I find the right examples for you? yes no

All Samples(18)  |  Call(18)  |  Derive(0)  |  Import(0)
Convert the image to grayscale.

:param image: The image to convert.
:return: An image.

        def grayscale(image):
    """
    Convert the image to grayscale.

    :param image: The image to convert.
    :return: An image.
    """
    return image.convert("L")
        


src/d/j/django-tint-0.1/tint/imageprocs/default.py   django-tint(Download)
    def grayscale(self, image, params):
        return ImageOps.grayscale(image)
 
    def invert(self, image, params):
        image = image.convert('RGB')

src/d/j/django-tint-HEAD/tint/imageprocs/default.py   django-tint(Download)
    def grayscale(self, image, params):
        return ImageOps.grayscale(image)
 
    def invert(self, image, params):
        image = image.convert('RGB')

src/a/n/android-tools-HEAD/eventrecorder/src/shell/imagediff.py   android-tools(Download)
        return 0;
    difference = difference.convert('RGB')
    difference = ImageOps.grayscale(difference)
    difference = ImageOps.invert(difference)
    try:

src/e/c/eclectus-HEAD/libeclectus/scripts/segmenttiles.py   eclectus(Download)
 
    if background != 'black':
        im = ImageOps.invert(ImageOps.grayscale(im))
 
    pix = im.load()

src/s/h/Shake-Images-0.4/shake_images/__init__.py   Shake-Images(Download)
 
    """
    return ImageOps.grayscale(img)
 
 

src/m/i/Minecraft-Overviewer-HEAD/overviewer_core/textures.py   Minecraft-Overviewer(Download)
    def tint_texture(self, im, c):
        # apparently converting to grayscale drops the alpha channel?
        i = ImageOps.colorize(ImageOps.grayscale(im), (0,0,0), c)
        i.putalpha(im.split()[3]); # copy the alpha band back in. assuming RGBA
        return i

src/d/i/digsby-HEAD/digsby/src/gui/toolbox/imagefx.py   digsby(Download)
 
    # convert to greyscale
    pil = ImageOps.grayscale(pil)
 
    # reapply alpha channel (if necessary)

src/m/a/Makerbot-HEAD/Unicorn/Plotterize Script/plotterize.py   Makerbot(Download)
	def load_image(self):
		self.image = Image.open(self.file)
		self.image = ImageOps.grayscale(self.image)
 
		brightness = ImageEnhance.Brightness(self.image)

src/t/h/thumpy-0.0.7/thumpy/__init__.py   thumpy(Download)
        # Other filters
        if 'gray' in options:
            self.im = ImageOps.grayscale(self.im)
 
    @property

src/c/r/crszu-0.0.1/crszu/cr.py   crszu(Download)
    """
    im = Image.open(im)
    gray = ImageOps.grayscale(im)
    biim = gray.point(lambda i: i < 230 and 1 or 255)
    return biim

  1 | 2  Next