3.1.0

ImageDraw arc, chord and pieslice can now use floats

There is no longer a need to ensure that the start and end arguments for arc,chord and pieslice are integers.

Note that these numbers are not simply rounded internally, but are actuallyutilised in the drawing process.

Consistent multiline text spacing

When using the ImageDraw multiline methods, the spacing betweenlines was inconsistent, based on the combination on ascenders anddescenders.

This has now been fixed, so that lines are offset by their baselines,not the absolute height of each line.

There is also now a default spacing of 4px between lines.

Exif, Jpeg and Tiff Metadata

There were major changes in the TIFF ImageFileDirectory support inPillow 3.0 that led to a number of regressions. Some of them have beenfixed in Pillow 3.1, and some of them have been extended to havedifferent behavior.

TiffImagePlugin.IFDRational

Pillow 3.0 changed rational metadata to use a float. In Pillow 3.1,this has changed to allow the expression of 0/0 as a valid piece ofrational metadata to reflect usage in the wild.

Rational metadata is now encapsulated in an IFDRationalinstance. This class extends the Rational class to allow a denominatorof 0. It compares as a float or a number, but does allow access to theraw numerator and denominator values through attributes.

When used in a ImageFileDirectory_v1, a 2 item tuple is returnedof the numerator and denominator, as was done previously.

This class should be used when adding a rational value to anImageFileDirectory for saving to image metadata.

JpegImagePlugin._getexif

In Pillow 3.0, the dictionary returned from the private, experimental,but generally widely used _getexif function changed to reflect theImageFileDirectory_v2 format, without a fallback to the previous format.

In Pillow 3.1, _getexif now returns a dictionary compatible withPillow 2.9 and earlier, built withImageFileDirectory_v1 instances. Additionally, anysingle item tuples have been unwrapped and return a bare element.

The format returned by Pillow 3.0 has been abandoned. A more fullyfeatured interface for EXIF is anticipated in a future release.

Out of Spec Metadata

In Pillow 3.0 and 3.1, images that contain metadata that is internallyconsistent but not in agreement with the TIFF spec may cause anexception when reading the metadata. This can happen when a tag thatis specified to have a single value is stored with an array of values.

It is anticipated that this behavior will change in future releases.