Update image-file-formats.rst

This commit is contained in:
0xflotus 2022-11-22 14:54:43 +01:00 committed by GitHub
parent 858135beb5
commit 73038257e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ method with the following parameters to affect how Ghostscript renders the EPS
Affects the scale of the resultant rasterized image. If the EPS suggests Affects the scale of the resultant rasterized image. If the EPS suggests
that the image be rendered at 100px x 100px, setting this parameter to that the image be rendered at 100px x 100px, setting this parameter to
2 will make the Ghostscript render a 200px x 200px image instead. The 2 will make the Ghostscript render a 200px x 200px image instead. The
relative position of the bounding box is maintained relative position of the bounding box is maintained:
.. code-block:: python .. code-block:: python
@ -127,7 +127,7 @@ colors. Instead, the image is converted to ``RGB`` handle this.
If you would prefer the first ``P`` image frame to be ``RGB`` as well, so that If you would prefer the first ``P`` image frame to be ``RGB`` as well, so that
every ``P`` frame is converted to ``RGB`` or ``RGBA`` mode, there is a setting every ``P`` frame is converted to ``RGB`` or ``RGBA`` mode, there is a setting
available available:
.. code-block:: python .. code-block:: python
@ -137,7 +137,7 @@ available
GIF frames do not always contain individual palettes however. If there is only GIF frames do not always contain individual palettes however. If there is only
a global palette, then all of the colors can fit within ``P`` mode. If you would a global palette, then all of the colors can fit within ``P`` mode. If you would
prefer the frames to be kept as ``P`` in that case, there is also a setting prefer the frames to be kept as ``P`` in that case, there is also a setting
available available:
.. code-block:: python .. code-block:: python
@ -145,7 +145,7 @@ available
GifImagePlugin.LOADING_STRATEGY = GifImagePlugin.LoadingStrategy.RGB_AFTER_DIFFERENT_PALETTE_ONLY GifImagePlugin.LOADING_STRATEGY = GifImagePlugin.LoadingStrategy.RGB_AFTER_DIFFERENT_PALETTE_ONLY
To restore the default behavior, where ``P`` mode images are only converted to To restore the default behavior, where ``P`` mode images are only converted to
``RGB`` or ``RGBA`` after the first frame ``RGB`` or ``RGBA`` after the first frame:
.. code-block:: python .. code-block:: python