python-imaging/Pillow — pull request #369 by wiredfool (2013-10-08 06:13:42+00:00)
Title: Save arbitrary tags in Tiff image files

Fixes #290, #291.

Warning: ce0e8b6 introduces an internal changes that affects one other file in Pillow, and potentially elsewhere if people are accessing the raw, undecoded data in ImageFileDirectory.tagdata. It used to store a tuple of type, data. Now it's just data, since there's another dict with the type information. See the big comment for the ImageFileDirectory class. I think it makes sense to change, but it's not essential.

Tests to exercise the tag writing code exposed many little bugs here, both in the libtiff and python code paths. There is a good chance that there's still some silliness with nested tuples somewhere, but we'll see on that.