GIFs change mode for later frames [ci skip]

This commit is contained in:
Andrew Murray 2021-11-29 18:50:22 +11:00
parent 1fb1bec0e8
commit eeb685b6c4

View File

@ -91,8 +91,9 @@ Pillow reads GIF87a and GIF89a versions of the GIF file format. The library
writes run-length encoded files in GIF87a by default, unless GIF89a features writes run-length encoded files in GIF87a by default, unless GIF89a features
are used or GIF89a is already in use. are used or GIF89a is already in use.
Note that GIF files are always read as grayscale (``L``) GIF files are initially read as grayscale (``L``) or palette mode (``P``)
or palette mode (``P``) images. images, but seeking to later frames in an image will change the mode to either
``RGB`` or ``RGBA``, depending on whether the first frame had transparency.
The :py:meth:`~PIL.Image.open` method sets the following The :py:meth:`~PIL.Image.open` method sets the following
:py:attr:`~PIL.Image.Image.info` properties: :py:attr:`~PIL.Image.Image.info` properties: