Rather than specifying a font when calling text-related ImageDraw methods, or setting a font on each ImageDraw instance, the default font can now be set for all future ImageDraw operations:
from PIL import ImageDraw, ImageFont ImageDraw.ImageDraw.font = ImageFont.truetype("Tests/fonts/FreeMono.ttf")
Multiple MPO frames can now be saved. Using the save_all
argument, all of
an image's frames will be saved to file:
from PIL import Image im = Image.open("frozenpond.mpo") im.save(out, save_all=True)
Additional images can also be appended when saving, by combining the
save_all
argument with the append_images
argument:
im.save(out, save_all=True, append_images=[im1, im2, ...])
Within the BLP image format, BLP1 data may use JPEG compression. Instead of telling the JPEG library that this data is in BGRX mode, Pillow will now decode the data in its natural CMYK mode, then convert it to RGB and rearrange the channels afterwards. Trying to load the data in an incorrect mode could result in a segmentation fault. This issue was introduced in Pillow 9.1.0.
Support has been added to read the ATI1, ATI2 and BC6H formats of DDS images.
When calling :py:meth:`~PIL.Image.Image.show` or using :py:mod:`~PIL.ImageShow`, all frames will now be shown.