Skip to content

Commit

Permalink
Merge pull request #3521 from python-pillow/update-release-notes
Browse files Browse the repository at this point in the history
Update 5.4.0 release notes
  • Loading branch information
hugovk committed Jan 1, 2019
2 parents b9d102e + a53c39e commit fcae132
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion docs/releasenotes/5.4.0.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
5.4.0 (unreleased)
5.4.0
-----

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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand All @@ -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)


New custom TIFF tags
^^^^^^^^^^^^^^^^^^^^

TIFF images can now be saved with custom integer, float and string 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
=============

Expand Down

0 comments on commit fcae132

Please sign in to comment.