PIL package (autodoc of remaining modules)
Reference for modules whose documentation has not yet been ported or written
can be found here.
ImageFile.LOAD_TRUNCATED_IMAGES
,
,
]
,
[
,
,
,
]
]
,
]
|
:
Returns:Offset from start of region, in bytes.
int
,
,
,
,
]
)
Write network order (big-endian) 16-bit sequence
format_description
= 'GD uncompressed images'
fp – 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:Raises:OSError – If the image could not be read.
bytes
,
]
object
Stores a TrueType font and color
[
]
|
=
None
)
Bases: object
(Experimental) WCK-style drawing interface
-
flush() → Image
-
render(op: str, xy: Coords, pen: Pen | Brush | None, brush: Brush | Pen | None = None, **kwargs: Any) → None
-
settransform(offset: tuple[float, float]) → None
Sets a transformation offset.
-
arc(xy: Coords, pen: Pen | Brush | None, start: float, end: ,
-
chord(xy: Coords, pen: Pen | Brush | None, start: float, end: ,
-
ellipse(xy: Coords, pen: Pen | Brush | None, *options: Any) → None
-
-
line(xy: Coords, pen: Pen | Brush | None, *options: Any) → None
-
-
pieslice(xy: Coords, pen: Pen | Brush | None, start: float, end: ,
-
polygon(xy: Coords, pen: Pen | Brush | None, *options: Any) → None
-
-
rectangle(xy: Coords, pen: Pen | Brush | None, *options: Any) → None
-
-
text(xy: tuple[float, float], text: AnyStr, font: Font) → None
Draws the string at the given position.
-
textbbox(xy: tuple[float, float], text: AnyStr, font: Font) → tuple[
-
textlength(text: AnyStr, font: Font) → float
Returns length (in pixels) of given text.
This is the amount by which following text should be offset.
-
basetype: str
Alias for field number 3
-
mode: str
Alias for field number 0
-
typestr: str
Alias for field number 4
:
|
|
=
''
)
Appends an iTXt chunk.
- Parameters:
key – latin-1 encodable text key name
value – value for this key
lang – language code
tkey – UTF-8 version of the key name
zip – compression flag
=
False
)
Appends a text chunk.
- Parameters:
key – latin-1 encodable text key name
value – value for this key, text or an
PIL.PngImagePlugin.iTXt instance
zip – compression flag
|
Load image data based on tile list
filename – WAL file name, or an opened file handle.
Returns:float
*options: Any
)
Draws an arc (a portion of a circle outline) between the start and end
angles, inside the given bounding box.
float
*options: Any
)
Same as arc(), but connects the end points
with a straight line.
Draws an ellipse inside the given bounding box.
Draws a line between the coordinates in the xy list.
float
*options: Any
)
Same as arc, but also draws straight lines between the end points and the
center of the bounding box.
The polygon outline consists of straight lines between the given
coordinates, plus a straight line between the last and the first
coordinate.
float
,
,
,
]
Returns bounding box (in pixels) of given text.
- Returns:
(left, top, right, bottom) bounding box