Add release notes for #9394 and #9419 (#9467)

This commit is contained in:
Hugo van Kemenade 2026-03-28 11:31:58 +02:00 committed by GitHub
commit 4b8ae8ede4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,52 @@
12.2.0
------
Security
========
TODO
^^^^
TODO
:cve:`YYYY-XXXXX`: TODO
^^^^^^^^^^^^^^^^^^^^^^^
TODO
API changes
===========
Error when encoding an empty image
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Attempting to encode an image with zero width or height would previously raise
a :py:exc:`SystemError`. That has now been changed to a :py:exc:`ValueError`.
This does not add any new errors. SGI, ICNS and ICO formats are still able to
save (0, 0) images.
API additions
=============
FontFile.to_imagefont()
^^^^^^^^^^^^^^^^^^^^^^^
:py:class:`~PIL.FontFile.FontFile` instances can now be directly converted to
:py:class:`~PIL.ImageFont.ImageFont` instances::
>>> from PIL import PcfFontFile
>>> with open("Tests/fonts/10x20-ISO8859-1.pcf", "rb") as fp:
... pcffont = PcfFontFile.PcfFontFile(fp)
... pcffont.to_imagefont()
...
<PIL.ImageFont.ImageFont object at 0x10457bb80>
Other changes
=============
Support reading JPEG2000 images with CMYK palettes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
JPEG2000 images with CMYK palettes can now be read. This is the first integration of
CMYK palettes into Pillow.

View File

@ -15,6 +15,7 @@ expected to be backported to earlier versions.
:maxdepth: 2
versioning
12.2.0
12.1.1
12.1.0
12.0.0