3.0.0

Saving Multipage Images

There is now support for saving multipage images in the GIF andPDF formats. To enable this functionality, pass in _save_all=True_as a keyword argument to the save:

  1. im.save('test.pdf', save_all=True)

Tiff ImageFileDirectory Rewrite

The Tiff ImageFileDirectory metadata code has been rewritten. Wherepreviously it returned a somewhat arbitrary set of values and tuples,it now returns bare values where appropriate and tuples when themetadata item is a sequence or collection.

The original metadata is still available in the TiffImage.tags, thenew values are available in the TiffImage.tags_v2 member. The oldstructures will be deprecated at some point in the future. Whensaving Tiff metadata, new code should use theTiffImagePlugin.ImageFileDirectory_v2 class.

Deprecated Methods

Several methods that have been marked as deprecated for many releaseshave been removed in this release:

  1. Image.tostring()
  2. Image.fromstring()
  3. Image.offset()
  4. ImageDraw.setink()
  5. ImageDraw.setfill()
  6. The ImageFileIO module
  7. The ImageFont.FreeTypeFont and ImageFont.truetype `file` keyword arg
  8. The ImagePalette private _make functions
  9. ImageWin.fromstring()
  10. ImageWin.tostring()

LibJpeg and Zlib are Required by Default

The external dependencies on libjpeg and zlib are now required by default.If the headers or libraries are not found, then installation will abortwith an error. This behaviour can be disabled with the —disable-libjpegand —disable-zlib flags.