Update release notes

This commit is contained in:
Hugo 2018-12-31 13:48:06 +02:00 committed by GitHub
parent b9d102ea70
commit 8c38e4c6d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,29 @@
5.4.0 (unreleased) 5.4.0
----- -----
API Changes API Changes
=========== ===========
APNG extension to PNG plugin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Animated Portable Network Graphics (APNG) images are not fully supported but
can be opened via the PNG plugin to get some basic info::
im = Image.open("image.apng")
print(im.mode) # "RGBA"
print(im.size) # (245, 245)
im.show() # Shows a single frame
Check for libjpeg-turbo
^^^^^^^^^^^^^^^^^^^^^^^
You can check if Pillow has been built against the libjpeg-turbo version of the
libjpeg library::
from PIL import features
features.check_feature("libjpeg_turbo") # True or False
Negative indexes in pixel access Negative indexes in pixel access
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -15,6 +35,26 @@ For example, to get or set the farthest pixel in the lower right of an image::
px[-1, -1] = (0, 0, 0) px[-1, -1] = (0, 0, 0)
New custom TIFF tags
^^^^^^^^^^^^^^^^^^^^
TIFF images can now be saved with custom integer, float and sting TIFF tags::
im = Image.new("RGB", (200, 100))
custom = {
37000: 4,
37001: 4.2,
37002: "custom tag value",
37003: u"custom tag value",
37004: b"custom tag value",
}
im.save("output.tif", tiffinfo=custom)
im2 = Image.open("output.tif")
print(im2.tag_v2[37000]) # 4
print(im2.tag_v2[37002]) # "custom tag value"
print(im2.tag_v2[37004]) # b"custom tag value"
Other Changes Other Changes
============= =============