2022-11-16 01:27:33 +03:00
|
|
|
9.4.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
Backwards Incompatible Changes
|
|
|
|
==============================
|
|
|
|
|
|
|
|
TODO
|
|
|
|
^^^^
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
Deprecations
|
|
|
|
============
|
|
|
|
|
|
|
|
TODO
|
|
|
|
^^^^
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
API Changes
|
|
|
|
===========
|
|
|
|
|
|
|
|
TODO
|
|
|
|
^^^^
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
API Additions
|
|
|
|
=============
|
|
|
|
|
|
|
|
Added start position for getmask and getmask2
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
Text may render differently when starting at fractional coordinates, so
|
|
|
|
:py:meth:`.FreeTypeFont.getmask` and :py:meth:`.FreeTypeFont.getmask2` now
|
|
|
|
support a ``start`` argument. This tuple of horizontal and vertical offset
|
|
|
|
will be used internally by :py:meth:`.ImageDraw.text` to more accurately place
|
|
|
|
text at the ``xy`` coordinates.
|
|
|
|
|
2022-11-20 10:14:59 +03:00
|
|
|
Added the ``exact`` encoding option for WebP
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
The ``exact`` encoding option for WebP is now supported. The WebP encoder
|
2022-11-21 03:00:24 +03:00
|
|
|
removes the hidden RGB values for better compression by default in libwebp 0.5
|
|
|
|
or later. By setting this option to ``True``, the encoder will keep the hidden
|
|
|
|
RGB values.
|
2022-11-20 10:14:59 +03:00
|
|
|
|
2022-12-29 01:41:14 +03:00
|
|
|
Added ``signed`` option when saving JPEG2000
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
If the ``signed`` keyword argument is present and true when saving JPEG2000
|
|
|
|
images, then tell the encoder to save the image as signed.
|
|
|
|
|
2022-12-24 00:32:58 +03:00
|
|
|
Added IFD, Interop and LightSource ExifTags enums
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
:py:data:`~PIL.ExifTags.IFD` has been added, allowing enums to be used with
|
|
|
|
:py:meth:`~PIL.Image.Exif.get_ifd`::
|
|
|
|
|
|
|
|
from PIL import Image, ExifTags
|
|
|
|
im = Image.open("Tests/images/flower.jpg")
|
|
|
|
print(im.getexif().get_ifd(ExifTags.IFD.Exif))
|
|
|
|
|
|
|
|
``IFD1`` can also be used with :py:meth:`~PIL.Image.Exif.get_ifd`, but it should
|
|
|
|
not be used in other contexts, as the enum value is only internally meaningful.
|
|
|
|
|
|
|
|
:py:data:`~PIL.ExifTags.Interop` has been added for tags within the Interop IFD::
|
|
|
|
|
|
|
|
from PIL import Image, ExifTags
|
|
|
|
im = Image.open("Tests/images/flower.jpg")
|
|
|
|
interop_ifd = im.getexif().get_ifd(ExifTags.IFD.Interop)
|
|
|
|
print(interop_ifd.get(ExifTags.Interop.InteropIndex)) # R98
|
|
|
|
|
|
|
|
:py:data:`~PIL.ExifTags.LightSource` has been added for values within the LightSource
|
|
|
|
tag::
|
|
|
|
|
|
|
|
from PIL import Image, ExifTags
|
|
|
|
im = Image.open("Tests/images/iptc.jpg")
|
|
|
|
exif_ifd = im.getexif().get_ifd(ExifTags.IFD.Exif)
|
|
|
|
print(ExifTags.LightSource(exif_ifd[0x9208])) # LightSource.Unknown
|
|
|
|
|
2022-11-26 11:11:51 +03:00
|
|
|
getxmp()
|
|
|
|
^^^^^^^^
|
|
|
|
|
|
|
|
`XMP data <https://en.wikipedia.org/wiki/Extensible_Metadata_Platform>`_ can now be
|
|
|
|
decoded for WEBP images through ``getxmp()``.
|
|
|
|
|
2022-12-07 14:30:15 +03:00
|
|
|
Writing JPEG comments
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
When saving a JPEG image, a comment can now be written from
|
|
|
|
:py:attr:`~PIL.Image.Image.info`, or by using an argument when saving::
|
|
|
|
|
|
|
|
im.save(out, comment="Test comment")
|
|
|
|
|
2022-11-16 01:27:33 +03:00
|
|
|
Security
|
|
|
|
========
|
|
|
|
|
|
|
|
TODO
|
|
|
|
^^^^
|
|
|
|
|
|
|
|
TODO
|
|
|
|
|
|
|
|
Other Changes
|
|
|
|
=============
|
|
|
|
|
2022-12-24 00:41:57 +03:00
|
|
|
Added support for DDS L and LA images
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-11-16 01:27:33 +03:00
|
|
|
|
2022-12-24 00:41:57 +03:00
|
|
|
Support has been added to read and write L and LA DDS images in the uncompressed
|
|
|
|
format, known as "luminance" textures.
|