From b888354ce92ea93a230d0105b8be4e20d00ad53a Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Thu, 5 Mar 2020 21:25:39 +1100 Subject: [PATCH] Document getbbox change for images with alpha [ci skip] --- docs/releasenotes/7.1.0.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/releasenotes/7.1.0.rst b/docs/releasenotes/7.1.0.rst index f9639a636be..6310023f4f5 100644 --- a/docs/releasenotes/7.1.0.rst +++ b/docs/releasenotes/7.1.0.rst @@ -1,6 +1,9 @@ 7.0.0 ----- +API Changes +=========== + Allow saving of zero quality JPEG images ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -14,3 +17,15 @@ been resolved. from PIL import Image im = Image.open("hopper.jpg") im.save("out.jpg", quality=0) + +Other Changes +============= + +If present, only use alpha channel for bounding box +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When the :py:meth:`~PIL.Image.Image.getbbox` method calculates the bounding +box, for an RGB image it trims black pixels. Similarly, for an RGBA image it +would trim black transparent pixels. This is now changed so that if an image +has an alpha channel (RGBA, RGBa, PA, LA, La), any transparent pixels are +trimmed.