Skip to content

Commit

Permalink
Added release notes
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Mar 29, 2022
1 parent 5fb1ff6 commit a7d36ef
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/releasenotes/9.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,26 @@ Added PyEncoder
written in Python. See :ref:`Writing Your Own File Codec in Python<file-codecs-py>` for
more information.

GifImagePlugin loading strategy
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Pillow 9.0.0 introduced the conversion of subsequent GIF frames to ``RGB`` or ``RGBA``. This
behaviour can now be changed so that the first ``P`` frame is converted to ``RGB`` as
well.

.. code-block:: python
from PIL import GifImagePlugin
GifImagePlugin.LOADING_STRATEGY = GifImagePlugin.LoadingStrategy.RGB_ALWAYS
Or subsequent frames can be kept in ``P`` mode as long as there is only a single
palette.

.. code-block:: python
from PIL import GifImagePlugin
GifImagePlugin.LOADING_STRATEGY = GifImagePlugin.LoadingStrategy.RGB_AFTER_DIFFERENT_PALETTE_ONLY
Other Changes
=============

Expand Down

0 comments on commit a7d36ef

Please sign in to comment.