内部モジュール

_binary モジュール

バイナリ入出力サポートルーチン。

PIL._binary.i16be(c: bytes, o: int = 0) int[source]
PIL._binary.i16le(c: bytes, o: int = 0) int[source]

2バイト(16ビット)の文字列を符号なし整数に変換します。

パラメータ:
  • c – 変換するバイトを含む文字列

  • o – 文字列内の変換するバイトのオフセット

PIL._binary.i32be(c: bytes, o: int = 0) int[source]
PIL._binary.i32le(c: bytes, o: int = 0) int[source]

4バイト(32ビット)の文字列を符号なし整数に変換します。

パラメータ:
  • c – 変換するバイトを含む文字列

  • o – 文字列内の変換するバイトのオフセット

PIL._binary.i8(c: bytes) int[source]
PIL._binary.o16be(i: int) bytes[source]
PIL._binary.o16le(i: int) bytes[source]
PIL._binary.o32be(i: int) bytes[source]
PIL._binary.o32le(i: int) bytes[source]
PIL._binary.o8(i: int) bytes[source]
PIL._binary.si16be(c: bytes, o: int = 0) int[source]

2バイト(16ビット)の文字列をビッグエンディアンの符号付き整数に変換します。

パラメータ:
  • c – 変換するバイトを含む文字列

  • o – 文字列内の変換するバイトのオフセット

PIL._binary.si16le(c: bytes, o: int = 0) int[source]

2バイト(16ビット)の文字列を符号付き整数に変換します。

パラメータ:
  • c – 変換するバイトを含む文字列

  • o – 文字列内の変換するバイトのオフセット

PIL._binary.si32be(c: bytes, o: int = 0) int[source]

4バイト(32ビット)の文字列をビッグエンディアンの符号付き整数に変換します。

パラメータ:
  • c – 変換するバイトを含む文字列

  • o – 文字列内の変換するバイトのオフセット

PIL._binary.si32le(c: bytes, o: int = 0) int[source]

4バイト(32ビット)の文字列を符号付き整数に変換します。

パラメータ:
  • c – 変換するバイトを含む文字列

  • o – 文字列内の変換するバイトのオフセット

_deprecate モジュール

PIL._deprecate.deprecate(deprecated: str, when: int | None, replacement: str | None = None, *, action: str | None = None, plural: bool = False) None[source]

非推奨ヘルパー。

パラメータ:
  • deprecated – 非推奨にするものの名前。

  • when – Pillowのメジャーバージョン(このバージョンで削除される)。

  • replacement – 代替物の名前。

  • action – 「replacement」の代わりに、カスタムの行動喚起(例:「新しいものへアップグレードしてください」)を指定します。

  • plural – 非推奨のものが複数形の場合、「is」ではなく「are」を使用する必要があるかどうか。

通常は次の形式です。

「[deprecated] は非推奨であり、Pillow [when](yyyy-mm-dd)で削除されます。代わりに [replacement] を使用してください。」

置換文を省略することもできます。

「[deprecated] は非推奨であり、Pillow [when](yyyy-mm-dd)で削除されます。」

または、別の行動喚起を使用することもできます。

「[deprecated] は非推奨であり、Pillow [when](yyyy-mm-dd)で削除されます。[action]。」

_tkinter_finder モジュール

Tcl/Tkライブラリにリンクするコンパイル済みモジュールを検索します。

_typing モジュール

一部のPythonバージョンでは使用できない型ヒントをインポートするための便利な方法を提供します。

class PIL._typing.Buffer

型エイリアス。

class PIL._typing.IntegralLike

型エイリアス。

class PIL._typing.NumpyArray

型エイリアス。

class PIL._typing.StrOrBytesPath

型エイリアス。

class PIL._typing.SupportsRead[source]

readメソッドをサポートするオブジェクト。

PIL._typing.TypeGuard = typing.TypeGuard[source]

詳細はtyping.TypeGuardを参照してください。

_util モジュール

class PIL._util.DeferredError(ex: BaseException)[source]

基底クラス: object

static new(ex: BaseException) Any[source]

ラップされた例外exを使用時に発生させるオブジェクトを作成し、Any型にキャストします。

PIL._util.is_path(f: Any) TypeGuard[str | bytes | PathLike[str] | PathLike[bytes]][source]

_version モジュール

PIL._version.__version__: str

Pillowのマスターバージョン番号です。その他のバージョン番号はこのモジュールを参照します。

PIL.Image.core モジュール

以前は_imagingとして知られていた内部インターフェースモジュールで、_imaging.cで実装されています。

class PIL.Image.core.ImagingCore

画像データの表現。