3.4.0
New resizing filters
Two new filters available for Image.resize()
and Image.thumbnail()
functions: BOX
and HAMMING
. BOX
is the high-performance filter withtwo times shorter window than BILINEAR
. It can be used for image reduction3 and more times and produces a sharper result than BILINEAR
.
HAMMING
filter has the same performance as BILINEAR
filter whileproviding the image downscaling quality comparable to BICUBIC
.Both new filters don’t show good quality for the image upscaling.
Deprecation Warning when Saving JPEGs
JPEG images cannot contain an alpha channel. Pillow prior to 3.4.0silently drops the alpha channel. With this release Pillow will nowissue a DeprecationWarning
when attempting to save a RGBA
modeimage as a JPEG. This will become an error in Pillow 4.2.
New DDS Decoders
Pillow can now decode DXT3 images, as well as the previously supportedDXT1 and DXT5 formats. All three formats are now decoded in C code forbetter performance.
Append images to GIF
Additional frames can now be appended when saving a GIF file, through theappend_images
argument. The new frames are passed in as a list of images,which may be have multiple frames themselves.
Note that the append_images
argument is only used if save_all
is alsoin effect, e.g.:
- im.save(out, save_all=True, append_images=[im1, im2, ...])
Save multiple frame TIFF
Multiple frames can now be saved in a TIFF file by using the save_all
option.e.g.:
- im.save("filename.tiff", format="TIFF", save_all=True)
Image.core.open_ppm removed
The nominally private/debugging function Image.core.open_ppm
hasbeen removed. If you were using this function, please useImage.open
instead.