From a7d36ef1f18a1ac4c0e8c8e778e0ad58363529e4 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Tue, 29 Mar 2022 22:11:42 +1100 Subject: [PATCH] Added release notes --- docs/releasenotes/9.1.0.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/releasenotes/9.1.0.rst b/docs/releasenotes/9.1.0.rst index 1e5203ac213..5a0bdba3ef7 100644 --- a/docs/releasenotes/9.1.0.rst +++ b/docs/releasenotes/9.1.0.rst @@ -160,6 +160,26 @@ Added PyEncoder written in Python. See :ref:`Writing Your Own File Codec in Python` 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 =============