From 4142fc43abda6f793930df4b3dea1c2ed8b85ef2 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 30 Sep 2023 10:14:10 +1000 Subject: [PATCH] Added release notes --- docs/reference/Image.rst | 3 ++- docs/releasenotes/10.1.0.rst | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/reference/Image.rst b/docs/reference/Image.rst index e356469b6..4281b182c 100644 --- a/docs/reference/Image.rst +++ b/docs/reference/Image.rst @@ -195,7 +195,6 @@ This helps to get the bounding box coordinates of the input image:: .. automethod:: PIL.Image.Image.getpalette .. automethod:: PIL.Image.Image.getpixel .. automethod:: PIL.Image.Image.getprojection -.. autoproperty:: PIL.Image.Image.has_transparency_data .. automethod:: PIL.Image.Image.histogram .. automethod:: PIL.Image.Image.paste .. automethod:: PIL.Image.Image.point @@ -352,6 +351,8 @@ Instances of the :py:class:`Image` class have the following attributes: .. seealso:: :attr:`~Image.is_animated`, :func:`~Image.seek` and :func:`~Image.tell` +.. autoattribute:: PIL.Image.Image.has_transparency_data + Classes ------- diff --git a/docs/releasenotes/10.1.0.rst b/docs/releasenotes/10.1.0.rst index da5153cce..ad076c1f3 100644 --- a/docs/releasenotes/10.1.0.rst +++ b/docs/releasenotes/10.1.0.rst @@ -32,10 +32,16 @@ TODO API Additions ============= -TODO -^^^^ +has_transparency_data +^^^^^^^^^^^^^^^^^^^^^ -TODO +Images now have :py:attr:`~PIL.Image.Image.has_transparency_data` to indicate +whether the image has transparency data, whether in the form of an alpha +channel, a palette with an alpha channel, or a "transparency" key in the +:py:attr:`~PIL.Image.Image.info` dictionary. + +Even if this attribute is true, the image might still appear solid, if all of +the values shown within are opaque. Security ========