mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-03 11:35:52 +03:00
Document getbbox change for images with alpha [ci skip]
This commit is contained in:
parent
b934b50867
commit
b888354ce9
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue
Block a user