4.2.0

Added Complex Text Rendering

Pillow now supports complex text rendering for scripts requiring glyphcomposition and bidirectional flow. This optional feature adds threedependencies: harfbuzz, fribidi, and raqm. See the installdocumentation for further details. This feature istested and works on Unix and Mac, but has not yet been built on Windowsplatforms.

New Optional Parameters

  • PIL.ImageDraw.floodfill() has a new optional parameter:threshold. This specifies a tolerance for the color to replace withthe flood fill.
  • The TIFF and PDF image writers now support the append_imagesoptional parameter for specifying additional images to createmultipage outputs.

New DecompressionBomb Warning

PIL.Image.Image.crop() now may raise a DecompressionBombwarning if the crop region enlarges the image over the thresholdspecified by PIL.Image.MAX_PIXELS.

Removed Deprecated Items

Several deprecated items have been removed.

  • The methods PIL.ImageWin.Dib.fromstring(),PIL.ImageWin.Dib.tostring() andPIL.TiffImagePlugin.ImageFileDirectory_v2.as_dict() havebeen removed.
  • Before Pillow 4.2.0, attempting to save an RGBA image as JPEG woulddiscard the alpha channel. From Pillow 3.4.0, a deprecation warningwas shown. From Pillow 4.2.0, the deprecation warning is removed andan IOError is raised.

Removed Core Image Function

The unused function Image.core.new_array was removed. This is aninternal function that should not have been used by user code, but itwas accessible from the python layer.