python-imaging/Pillow — pull request #638 by hugovk (2014-04-25 08:08:27+00:00)
Title: Support for pickling with tests

* Pickling and unpickling implemented via `__getstate__()` and `__setstate__()` calling `tobytes()` and `frombytes()`.
* Tested with `pickle` (and `cPickle` for Python 2).
* Tests pickle an image, then unpickle it and asserts they're equal.
* Tests pickling to file and string.
* Tests are done for all protocol versions.
* Tests a `tobytes()` and `frombytes()` round trip for good measure.
* Finally, some pep8 of Image.py.

If accepted, this PR can close #629.