Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 1.15 KB

ImageFilter.rst

File metadata and controls

47 lines (36 loc) · 1.15 KB

:pyImageFilter Module

The :pyImageFilter module contains definitions for a pre-defined set of filters, which can be be used with the :pyImage.filter() <PIL.Image.Image.filter> method.

Example: Filter an image

from PIL import ImageFilter

im1 = im.filter(ImageFilter.BLUR)

im2 = im.filter(ImageFilter.MinFilter(3))
im3 = im.filter(ImageFilter.MinFilter)  # same as MinFilter(3)

Filters

The current version of the library provides the following set of predefined image enhancement filters:

  • BLUR
  • CONTOUR
  • DETAIL
  • EDGE_ENHANCE
  • EDGE_ENHANCE_MORE
  • EMBOSS
  • FIND_EDGES
  • SMOOTH
  • SMOOTH_MORE
  • SHARPEN

PIL.ImageFilter.GaussianBlur

PIL.ImageFilter.UnsharpMask

PIL.ImageFilter.Kernel

PIL.ImageFilter.RankFilter

PIL.ImageFilter.MedianFilter

PIL.ImageFilter.MinFilter

PIL.ImageFilter.MaxFilter

PIL.ImageFilter.ModeFilter