2020-06-14 01:45:29 +03:00
.. py:module :: PIL.features
2020-06-13 05:01:38 +03:00
.. py:currentmodule :: PIL.features
2020-06-22 06:52:50 +03:00
:py:mod: `~PIL.features` Module
==============================
2020-06-13 05:01:38 +03:00
The :py:mod: `PIL.features` module can be used to detect which Pillow features are available on your system.
.. autofunction :: PIL.features.pilinfo
.. autofunction :: PIL.features.check
2020-06-14 06:35:43 +03:00
.. autofunction :: PIL.features.version
2020-06-13 05:01:38 +03:00
.. autofunction :: PIL.features.get_supported
Modules
-------
Support for the following modules can be checked:
* `` pil `` : The Pillow core module, required for all functionality.
2021-01-26 00:13:33 +03:00
* `` tkinter `` : Tkinter support.
2020-06-13 05:01:38 +03:00
* `` freetype2 `` : FreeType font support via :py:func: `PIL.ImageFont.truetype` .
2020-06-14 01:45:29 +03:00
* `` littlecms2 `` : LittleCMS 2 support via :py:mod: `PIL.ImageCms` .
2020-06-13 05:01:38 +03:00
* `` webp `` : WebP image support.
.. autofunction :: PIL.features.check_module
2020-06-14 06:35:43 +03:00
.. autofunction :: PIL.features.version_module
2020-06-13 05:01:38 +03:00
.. autofunction :: PIL.features.get_supported_modules
Codecs
------
2020-06-14 06:35:43 +03:00
Support for these is only checked during Pillow compilation.
2020-06-13 05:01:38 +03:00
If the required library was uninstalled from the system, the `` pil `` core module may fail to load instead.
2020-06-14 06:35:43 +03:00
Except for `` jpg `` , the version number is checked at run-time.
2020-06-13 05:01:38 +03:00
Support for the following codecs can be checked:
2020-06-14 06:35:43 +03:00
* `` jpg `` : (compile time) Libjpeg support, required for JPEG based image formats. Only compile time version number is available.
2020-06-14 01:45:29 +03:00
* `` jpg_2000 `` : (compile time) OpenJPEG support, required for JPEG 2000 image formats.
* `` zlib `` : (compile time) Zlib support, required for zlib compressed formats, such as PNG.
* `` libtiff `` : (compile time) LibTIFF support, required for TIFF based image formats.
2020-06-13 05:01:38 +03:00
.. autofunction :: PIL.features.check_codec
2020-06-14 06:35:43 +03:00
.. autofunction :: PIL.features.version_codec
2020-06-13 05:01:38 +03:00
.. autofunction :: PIL.features.get_supported_codecs
Features
--------
Some of these are only checked during Pillow compilation.
If the required library was uninstalled from the system, the relevant module may fail to load instead.
2020-06-14 06:35:43 +03:00
Feature version numbers are available only where stated.
2020-06-13 05:01:38 +03:00
Support for the following features can be checked:
2020-06-14 06:35:43 +03:00
* `` libjpeg_turbo `` : (compile time) Whether Pillow was compiled against the libjpeg-turbo version of libjpeg. Compile-time version number is available.
2024-10-25 21:37:21 +03:00
* `` zlib_ng `` : (compile time) Whether Pillow was compiled against the zlib-ng version of zlib. Compile-time version number is available.
2022-01-15 01:02:31 +03:00
* `` raqm `` : Raqm library, required for `` ImageFont.Layout.RAQM `` in :py:func: `PIL.ImageFont.truetype` . Run-time version number is available for Raqm 0.7.0 or newer.
2020-06-14 06:35:43 +03:00
* `` libimagequant `` : (compile time) ImageQuant quantization support in :py:func: `PIL.Image.Image.quantize` . Run-time version number is available.
2020-06-13 05:01:38 +03:00
* `` xcb `` : (compile time) Support for X11 in :py:func: `PIL.ImageGrab.grab` via the XCB library.
2024-07-08 19:07:43 +03:00
* `` transp_webp `` : Deprecated. Always `` True `` if WebP module is installed.
* `` webp_mux `` : Deprecated. Always `` True `` if WebP module is installed.
* `` webp_anim `` : Deprecated. Always `` True `` if WebP module is installed.
2020-06-13 05:01:38 +03:00
.. autofunction :: PIL.features.check_feature
2020-06-14 06:35:43 +03:00
.. autofunction :: PIL.features.version_feature
2020-06-13 05:01:38 +03:00
.. autofunction :: PIL.features.get_supported_features