module pixeltable.functions.image
Pixeltable UDFs forImageType.
Example:
udf alpha_composite()
im2 over im1.
Equivalent to PIL.Image.alpha_composite()
udf b64_encode()
img(Image): imageimage_format(String): image format supported by PIL
udf blend()
PIL.Image.blend()
udf composite()
PIL.Image.composite()
udf convert()
PIL.Image.Image.convert().
Parameters:
mode(String): The mode to convert to. See the Pillow documentation for a list of supported modes.
udf crop()
PIL.Image.Image.crop()
udf effect_spread()
PIL.Image.Image.effect_spread()
Parameters:
distance(Int): The distance to spread pixels.
udf entropy()
PIL.Image.Image.entropy()
Parameters:
mask(Image | None): An optional mask image.extrema(Json | None): An optional list of extrema.
udf get_metadata()
udf getbands()
PIL.Image.Image.getbands()
udf getbbox()
PIL.Image.Image.getbbox()
Parameters:
alpha_only(Bool): IfTrue, and the image has an alpha channel, trim transparent pixels. Otherwise, trim pixels when all channels are zero.
udf getchannel()
PIL.Image.Image.getchannel()
Parameters:
channel(Int): The channel to extract. This is a 0-based index.
udf getcolors()
maxcolors.
Equivalent to
PIL.Image.Image.getcolors()
Parameters:
maxcolors(Int): The maximum number of colors to return.
udf getextrema()
PIL.Image.Image.getextrema()
udf getpalette()
PIL.Image.Image.getpalette()
Parameters:
mode(String | None): The mode to convert the palette to.
udf getpixel()
xy is a tuple containing the x and y coordinates.
Equivalent to
PIL.Image.Image.getpixel()
Parameters:
xy(Json): The coordinates, given as (x, y).
udf getprojection()
PIL.Image.Image.getprojection()
udf height()
udf histogram()
PIL.Image.Image.histogram()
Parameters:
mask(Image | None): An optional mask image.extrema(Json | None): An optional list of extrema.
udf mode()
udf point()
PIL.Image.Image.point()
Parameters:
lut(Json): A lookup table.
udf quantize()
PIL.Image.Image.quantize()
Parameters:
colors(Int): The number of colors to quantize to.method(Int | None): The quantization method. See the Pillow documentation for a list of supported methods.kmeans(Int): The number of k-means clusters to use.palette(Image | None): The palette to use.dither(Int): The dithering method. See the Pillow documentation for a list of supported methods.
udf reduce()
PIL.Image.Image.reduce()
Parameters:
factor(Int): The reduction factor.box(Json | None): An optional 4-tuple of ints providing the source image region to be reduced. The values must be within (0, 0, width, height) rectangle. If omitted or None, the entire source is used.
udf resize()
PIL.Image.Image.resize()
udf rotate()
PIL.Image.Image.rotate()
Parameters:
angle(Int): The angle to rotate the image, in degrees. Positive angles are counter-clockwise.
udf transpose()
PIL.Image.Image.transpose()
Parameters:
method(Int): The transpose method. See the Pillow documentation for a list of supported methods.