From c6b04cb16df2168f3fedd8c0fc621a20630e2fa1 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 11 Jun 2022 09:43:06 +1000 Subject: [PATCH] Document apply_transparency() --- docs/reference/Image.rst | 1 + docs/releasenotes/9.2.0.rst | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst index 2613b6585b3..d6f7e49f9e4 100644 --- a/docs/reference/Image.rst +++ b/docs/reference/Image.rst @@ -202,6 +202,7 @@ This helps to get the bounding box coordinates of the input image: .. automethod:: PIL.Image.Image.getexif .. automethod:: PIL.Image.Image.getextrema .. automethod:: PIL.Image.Image.getpalette +.. automethod:: PIL.Image.Image.apply_transparency .. automethod:: PIL.Image.Image.getpixel .. automethod:: PIL.Image.Image.getprojection .. automethod:: PIL.Image.Image.histogram diff --git a/docs/releasenotes/9.2.0.rst b/docs/releasenotes/9.2.0.rst index eddbd07a2d7..424fd487a29 100644 --- a/docs/releasenotes/9.2.0.rst +++ b/docs/releasenotes/9.2.0.rst @@ -57,10 +57,13 @@ TODO API Additions ============= -TODO -^^^^ +Image.apply_transparency +^^^^^^^^^^^^^^^^^^^^^^^^ -TODO +Added :py:meth:`~PIL.Image.Image.apply_transparency`, a method to take a P mode image +with "transparency" in ``im.info``, and apply the transparency to the palette instead. +The image's palette mode will become "RGBA", and "transparency" will be removed from +``im.info``. Security ========