现在支持使用libImageQuant作为更高质量的量化选项 Image.quantize()
在类Unix平台上。这种支持需要从源代码构建枕头来对抗libimagequant。由于许可证差异,我们无法分发二进制文件。
有两个新选项可以控制 build_ext
任务在 setup.py
:
--debug
dumps all of the directories and files that are checked when searching for libraries or headers when building the extensions.--disable-platform-guessing
removes many of the directories that are checked for libraries and headers for build systems or cross compilers that specify that information in via environment variables.
对于每个通道8位图像的图像重采样只使用整数计算重写。这在大多数平台上速度更快,并且不会在广泛范围内引入精度误差。通过其他性能改进,重新采样平均速度提高了60%。
图像的颜色计算 LA
半透明像素上的模式是固定的。
可被90度整除的角度的旋转现在总是使用换位。在这种情况下,这大大提高了质量和性能。同时,解决了旋转90度时图像尺寸计算错误的问题。
版本2 exif和tiff元数据中二进制数据的返回类型已从整数元组更改为字节。这是行为的一个变化,因为 3.0.0
.