Internal Modules¶
_binary
Module¶
Binary input/output support routines.
- PIL._binary.i16le(c: bytes, o: int = 0) int [source]¶
Converts a 2-bytes (16 bits) string to an unsigned integer.
- Parameters:
c – string containing bytes to convert
o – offset of bytes to convert in string
- PIL._binary.i32le(c: bytes, o: int = 0) int [source]¶
Converts a 4-bytes (32 bits) string to an unsigned integer.
- Parameters:
c – string containing bytes to convert
o – offset of bytes to convert in string
- PIL._binary.si16be(c: bytes, o: int = 0) int [source]¶
Converts a 2-bytes (16 bits) string to a signed integer, big endian.
- Parameters:
c – string containing bytes to convert
o – offset of bytes to convert in string
- PIL._binary.si16le(c: bytes, o: int = 0) int [source]¶
Converts a 2-bytes (16 bits) string to a signed integer.
- Parameters:
c – string containing bytes to convert
o – offset of bytes to convert in string
_deprecate
Module¶
- PIL._deprecate.deprecate(deprecated: str, when: int | None, replacement: str | None = None, *, action: str | None = None, plural: bool = False) None [source]¶
Deprecations helper.
- Parameters:
deprecated – Name of thing to be deprecated.
when – Pillow major version to be removed in.
replacement – Name of replacement.
action – Instead of “replacement”, give a custom call to action e.g. “Upgrade to new thing”.
plural – if the deprecated thing is plural, needing “are” instead of “is”.
Usually of the form:
“[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd). Use [replacement] instead.”
You can leave out the replacement sentence:
“[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd)”
Or with another call to action:
“[deprecated] is deprecated and will be removed in Pillow [when] (yyyy-mm-dd). [action].”
_tkinter_finder
Module¶
Find compiled module linking to Tcl / Tk libraries
_typing
Module¶
Provides a convenient way to import type hints that are not available on some Python versions.
- class PIL._typing.Buffer¶
Typing alias.
- class PIL._typing.IntegralLike¶
Typing alias.
- class PIL._typing.NumpyArray¶
Typing alias.
- class PIL._typing.StrOrBytesPath¶
Typing alias.
- PIL._typing.TypeGuard = typing.TypeGuard[source]¶
See
typing.TypeGuard
.
_util
Module¶
- class PIL._util.DeferredError(ex: BaseException)[source]¶
Bases:
object
- static new(ex: BaseException) Any [source]¶
Creates an object that raises the wrapped exception
ex
when used, and casts it toAny
type.
_version
Module¶
PIL.Image.core
Module¶
An internal interface module previously known as _imaging
,
implemented in _imaging.c
.
- class PIL.Image.core.ImagingCore¶
A representation of the image data.