mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-04-25 11:33:42 +03:00
Release notes: add ImageColor and ImageMode optimisations, and type hints
This commit is contained in:
parent
6c4b47dc46
commit
2825323e84
|
@ -69,6 +69,15 @@ can be found here.
|
||||||
:undoc-members:
|
:undoc-members:
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
|
|
||||||
|
:mod:`~PIL.ImageMode` Module
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
.. automodule:: PIL.ImageMode
|
||||||
|
:members:
|
||||||
|
:member-order: bysource
|
||||||
|
:undoc-members:
|
||||||
|
:show-inheritance:
|
||||||
|
|
||||||
:mod:`~PIL.ImageTransform` Module
|
:mod:`~PIL.ImageTransform` Module
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,6 @@
|
||||||
10.2.0
|
10.2.0
|
||||||
------
|
------
|
||||||
|
|
||||||
Backwards Incompatible Changes
|
|
||||||
==============================
|
|
||||||
|
|
||||||
TODO
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
Deprecations
|
Deprecations
|
||||||
============
|
============
|
||||||
|
|
||||||
|
@ -20,11 +12,6 @@ ImageFile.raise_oserror
|
||||||
error codes returned by a codec's ``decode()`` method, which ImageFile already does
|
error codes returned by a codec's ``decode()`` method, which ImageFile already does
|
||||||
automatically.
|
automatically.
|
||||||
|
|
||||||
TODO
|
|
||||||
^^^^
|
|
||||||
|
|
||||||
TODO
|
|
||||||
|
|
||||||
API Changes
|
API Changes
|
||||||
===========
|
===========
|
||||||
|
|
||||||
|
@ -92,6 +79,21 @@ Support has been added to read the BC4U format of DDS images.
|
||||||
Support has also been added to read DX10 BC1 and BC4, whether UNORM or
|
Support has also been added to read DX10 BC1 and BC4, whether UNORM or
|
||||||
TYPELESS.
|
TYPELESS.
|
||||||
|
|
||||||
|
Optimized ImageColor.getrgb and getcolor
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The color calculations of :py:attr:`~PIL.ImageColor.getrgb` and
|
||||||
|
:py:attr:`~PIL.ImageColor.getcolor` are now cached using
|
||||||
|
:py:func:`functools.lru_cache`. Cached calls of ``getrgb`` are 3.1 - 91.4 times
|
||||||
|
as fast and ``getcolor`` are 5.1 - 19.6 times as fast.
|
||||||
|
|
||||||
|
Optimized ImageMode.getmode
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The lookups made by :py:attr:`~PIL.ImageMode.getmode` are now cached using
|
||||||
|
:py:func:`functools.lru_cache` instead of a custom cache. Cached calls are 20%
|
||||||
|
faster.
|
||||||
|
|
||||||
Optimized ImageStat.Stat count and extrema
|
Optimized ImageStat.Stat count and extrema
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
@ -105,3 +107,15 @@ Encoder errors now report error detail as string
|
||||||
|
|
||||||
:py:exc:`OSError` exceptions from image encoders now include a textual description of
|
:py:exc:`OSError` exceptions from image encoders now include a textual description of
|
||||||
the error instead of a numeric error code.
|
the error instead of a numeric error code.
|
||||||
|
|
||||||
|
Type hints
|
||||||
|
^^^^^^^^^^
|
||||||
|
|
||||||
|
Work has begun to add type annotations to Pillow, including:
|
||||||
|
|
||||||
|
* :py:class:`~PIL.ContainerIO`
|
||||||
|
* :py:class:`~PIL.FontFile` and subclasses
|
||||||
|
* :py:class:`~PIL.ImageChops`
|
||||||
|
* :py:class:`~PIL.ImageMode`
|
||||||
|
* :py:class:`~PIL.ImageSequence`
|
||||||
|
* :py:class:`~PIL.TarIO`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user