mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
41 lines
1.1 KiB
ReStructuredText
41 lines
1.1 KiB
ReStructuredText
7.1.0
|
|
-----
|
|
|
|
API Changes
|
|
===========
|
|
|
|
Allow saving of zero quality JPEG images
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
If no quality was specified when saving a JPEG, Pillow internally used a value
|
|
of zero to indicate that the default quality should be used. However, this
|
|
removed the ability to actually save a JPEG with zero quality. This has now
|
|
been resolved.
|
|
|
|
.. code-block:: python
|
|
|
|
from PIL import Image
|
|
im = Image.open("hopper.jpg")
|
|
im.save("out.jpg", quality=0)
|
|
|
|
API Additions
|
|
=============
|
|
|
|
Reading JPEG comments
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
When opening a JPEG image, the comment may now be read into
|
|
:py:attr:`~PIL.Image.Image.info`.
|
|
|
|
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.
|