3.0.0#

保存多页图像#

现在支持在 GIFPDF 格式。要启用此功能,请传入 save_all=True 作为保存的关键字参数::

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

tiff imagefiledirectory重写#

tiff imagefiledirectory元数据代码已被重写。以前它返回的是一组任意的值和元组,现在在适当的情况下返回裸值,在元数据项是序列或集合时返回元组。

原始元数据仍在tiffimage.tags中可用,新值在tiffimage.tags_v2成员中可用。在将来的某个时候,旧结构将被弃用。保存TIFF元数据时,新代码应使用TiffImagePlugin.ImageFileDirectory_v2类。

不推荐使用的方法#

已在此版本中删除多个已标记为不推荐使用的方法::

Image.tostring()
Image.fromstring()
Image.offset()
ImageDraw.setink()
ImageDraw.setfill()
The ImageFileIO module
The ImageFont.FreeTypeFont and ImageFont.truetype ``file`` keyword arg
The ImagePalette private _make functions
ImageWin.fromstring()
ImageWin.tostring()

默认情况下需要libjpeg和zlib#

默认情况下,现在需要对libjpeg和zlib进行外部依赖。如果找不到头或库,则安装将中止,并出现错误。此行为可以通过 --disable-libjpeg--disable-zlib 旗帜。