

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 moduleImagePath module¶TheImagePath module is used to store and manipulate 2-dimensionalvector data. Path objects can be passed to the methods on theImageDraw module.
A path object. The coordinate list can be any sequence object containingeither 2-tuples [(x, y), …] or numeric values [x, y, …].
You can also create a path object from another path object.
In 1.1.6 and later, you can also pass in any object that implementsPython’s buffer API. The buffer should provide read access, and contain Cfloats in machine byte order.
The path object implements most parts of the Python sequence interface, andbehaves like a list of (x, y) pairs. You can use len(), item access, andslicing as usual. However, this does not support slice assignment, or itemand slice deletion.
xy – A sequence. The sequence can contain 2-tuples [(x, y), …]or a flat list of numbers [x, y, …].
Compacts the path, by removing points that are close to each other. Thismethod modifies the path in place, and returns the number of points left inthe path.
distance is measured asManhattan distance and defaults to twopixels.
Gets the bounding box of the path.
(x0,y0,x1,y1)
Maps the path through a function.
Converts the path to a Python list [(x, y), …].
flat – By default, this function returns a list of 2-tuples[(x, y), …]. If this argument isTrue, itreturns a flat list [x, y, …] instead.
A list of coordinates. Seeflat.
Transforms the path in place, using an affine transform. The matrix is a6-tuple (a, b, c, d, e, f), and each point is mapped as follows:
xOut=xIn*a+yIn*b+cyOut=xIn*d+yIn*e+f