

Image moduleImageChops (“channel operations”) moduleImageCms moduleImageColor moduleImageDraw moduleImageEnhance moduleImageFile moduleImageFilter moduleImageFont moduleImageGrab moduleImageMath moduleImageMorph moduleImageOps moduleImagePalette moduleImagePath moduleImageQt moduleImageSequence moduleImageShow moduleImageStat moduleImageText moduleImageTk moduleImageTransform moduleImageWin module (Windows-only)ExifTags moduleTiffTags moduleJpegPresets modulePSDraw modulePixelAccess classfeatures moduleReference for modules whose documentation has not yet been ported or writtencan be found here.
PIL module¶Bases:OSError
Raised inPIL.Image.open() if an image cannot be opened and identified.
If a PNG image raises this error, settingImageFile.LOAD_TRUNCATED_IMAGESto true may allow the image to be opened after all. The setting will ignore missingdata and checksum failures.
BdfFontFile module¶Parse X Bitmap Distribution Format (BDF)
ContainerIO module¶Bases:IO
A file object that provides read access to a part of an existingfile (for example a TAR file).
Read data.
n – Number of bytes to read. If omitted, zero or negative,read until end of region.
An 8-bit string.
Read a line of text.
n – Number of bytes to read. If omitted, zero or negative,read until end of line.
An 8-bit string.
Read multiple lines of text.
n – Number of lines to read. If omitted, zero, negative or None,read until end of region.
A list of 8-bit strings.
FontFile module¶GdImageFile module¶Note
This format cannot be automatically recognized, so theclass is not registered for use withPIL.Image.open(). To open agd file, use thePIL.GdImageFile.open() function instead.
Warning
THE GD FORMAT IS NOT DESIGNED FOR DATA INTERCHANGE. Thisimplementation is provided for convenience and demonstrationalpurposes only.
Bases:ImageFile
Image plugin for the GD uncompressed format. Note that this formatis not supported by the standardPIL.Image.open() function. To usethis plugin, you have to import thePIL.GdImageFile module anduse thePIL.GdImageFile.open() function.
Load texture from a GD image file.
fp – GD file name, or an opened file handle.
mode – Optional mode. In this version, if the mode argumentis given, it must be “r”.
An image instance.
OSError – If the image could not be read.
GimpGradientFile module¶Stuff to translate curve segments to palette values (derived fromthe corresponding code in GIMP, written by Federico Mena Quintero.See the GIMP distribution for more information.)
Bases:GradientFile
File handler for GIMP’s gradient format.
GimpPaletteFile module¶ImageDraw2 module¶(Experimental) WCK-style drawing interface operations
See also
Bases:object
Stores an outline color and width.
Bases:object
Stores a TrueType font and color
Bases:object
(Experimental) WCK-style drawing interface
Draws an arc (a portion of a circle outline) between the start and endangles, inside the given bounding box.
See also
Same asarc(), but connects the end pointswith a straight line.
See also
Draws an ellipse inside the given bounding box.
Draws a line between the coordinates in thexy list.
See also
Same as arc, but also draws straight lines between the end points and thecenter of the bounding box.
Draws a polygon.
The polygon outline consists of straight lines between the givencoordinates, plus a straight line between the last and the firstcoordinate.
Draws a rectangle.
Draws the string at the given position.
See also
ImageMode module¶Bases:NamedTuple
Wrapper for mode strings.
Gets a mode descriptor for the given mode.
PaletteFile module¶PcfFontFile module¶PngImagePlugin.iTXt class¶Bases:str
Subclass of string to allow iTXt chunks to look like strings whilekeeping their extra information
PngImagePlugin.PngInfo class¶Bases:object
PNG chunk container (for use with save(pnginfo=))
Appends an arbitrary chunk. Use with caution.
cid – a byte string, 4 bytes long.
data – a byte string of the encoded data
after_idat – for use with private chunks. Whether the chunkshould be written after IDAT
TarIO module¶WalImageFile module¶This reader is based on the specification available from:https://www.flipcode.com/archives/Quake_2_BSP_File_Format.shtmland has been tested with a few sample files found using google.
Note
This format cannot be automatically recognized, so the readeris not registered for use withPIL.Image.open().To open a WAL file, use thePIL.WalImageFile.open() function instead.
Bases:ImageFile
Load image data based on tile list
Load texture from a Quake2 WAL texture file.
By default, a Quake2 standard palette is attached to the texture.To override the palette, use thePIL.Image.Image.putpalette() method.
filename – WAL file name, or an opened file handle.
An image instance.
PIL moduleBdfFontFile moduleContainerIO moduleContainerIOContainerIO.close()ContainerIO.fileno()ContainerIO.flush()ContainerIO.isatty()ContainerIO.read()ContainerIO.readable()ContainerIO.readline()ContainerIO.readlines()ContainerIO.seek()ContainerIO.seekable()ContainerIO.tell()ContainerIO.truncate()ContainerIO.writable()ContainerIO.write()ContainerIO.writelines()FontFile moduleGdImageFile moduleGimpGradientFile moduleGimpPaletteFile moduleImageDraw2 moduleImageMode modulePaletteFile modulePcfFontFile modulePngImagePlugin.iTXt classPngImagePlugin.PngInfo classTarIO moduleWalImageFile module