PIL Package (autodoc of remaining modules)¶
Reference for modules whose documentation has not yet been ported or written can be found here.
BdfFontFile
Module¶
-
class
PIL.BdfFontFile.
BdfFontFile
(fp)[source]¶ Bases:
PIL.FontFile.FontFile
ContainerIO
Module¶
-
class
PIL.ContainerIO.
ContainerIO
(file, offset, length)[source]¶ Bases:
object
-
read
(n=0)[source]¶ Read data.
Parameters: n – Number of bytes to read. If omitted or zero, read until end of region. Returns: An 8-bit string.
-
GdImageFile
Module¶
-
class
PIL.GdImageFile.
GdImageFile
(fp=None, filename=None)[source]¶ Bases:
PIL.ImageFile.ImageFile
-
format
= 'GD'¶
-
format_description
= 'GD uncompressed images'¶
-
-
PIL.GdImageFile.
open
(fp, mode='r')[source]¶ Load texture from a GD image file.
Parameters: - filename – GD file name, or an opened file handle.
- mode – Optional mode. In this version, if the mode argument is given, it must be “r”.
Returns: An image instance.
Raises: IOError – If the image could not be read.
GimpGradientFile
Module¶
GimpPaletteFile
Module¶
ImageShow
Module¶
-
class
PIL.ImageShow.
DisplayViewer
[source]¶ Bases:
PIL.ImageShow.UnixViewer
-
class
PIL.ImageShow.
EogViewer
[source]¶ Bases:
PIL.ImageShow.UnixViewer
-
class
PIL.ImageShow.
UnixViewer
[source]¶ Bases:
PIL.ImageShow.Viewer
-
format
= 'PNG'¶
-
options
= {'compress_level': 1}¶
-
-
class
PIL.ImageShow.
Viewer
[source]¶ Bases:
object
Base class for viewers.
-
format
= None¶
-
options
= {}¶
-
-
class
PIL.ImageShow.
XVViewer
[source]¶ Bases:
PIL.ImageShow.UnixViewer
ImageTransform
Module¶
-
class
PIL.ImageTransform.
AffineTransform
(data)[source]¶ Bases:
PIL.ImageTransform.Transform
Define an affine image transform.
This function takes a 6-tuple (a, b, c, d, e, f) which contain the first two rows from an affine transform matrix. For each pixel (x, y) in the output image, the new value is taken from a position (a x + b y + c, d x + e y + f) in the input image, rounded to nearest pixel.
This function can be used to scale, translate, rotate, and shear the original image.
See
transform()
Parameters: matrix – A 6-tuple (a, b, c, d, e, f) containing the first two rows from an affine transform matrix. -
method
= 0¶
-
-
class
PIL.ImageTransform.
ExtentTransform
(data)[source]¶ Bases:
PIL.ImageTransform.Transform
Define a transform to extract a subregion from an image.
Maps a rectangle (defined by two corners) from the image to a rectangle of the given size. The resulting image will contain data sampled from between the corners, such that (x0, y0) in the input image will end up at (0,0) in the output image, and (x1, y1) at size.
This method can be used to crop, stretch, shrink, or mirror an arbitrary rectangle in the current image. It is slightly slower than crop, but about as fast as a corresponding resize operation.
See
transform()
Parameters: bbox – A 4-tuple (x0, y0, x1, y1) which specifies two points in the input image’s coordinate system. -
method
= 1¶
-
-
class
PIL.ImageTransform.
MeshTransform
(data)[source]¶ Bases:
PIL.ImageTransform.Transform
Define a mesh image tran