python-imaging/Pillow — pull request #311 by cezarsa (2013-07-30 19:56:20+00:00)
Title: Added IGNORE_DECODING_ERRORS flag to ImageFile allowing corrupted images to load

Since commit 33bf5d9d37d377c43ac38be497b1e9cdd1d34832 PIL is no longer able to load [this image][1] even after setting ```ImageFile.LOAD_TRUNCATED_IMAGES = True``` because of the ```t == 0``` check that was introduced then.

Because I'm not sure about what use cases @d-schmidt had in mind when the size check was added, I've introduced a new flag called IGNORE_DECODING_ERRORS that if True will never raise IOError. This should make everyone happy.

[1]: http://s.glbimg.com/jo/g1/f/original/2013/07/30/dsc0337_c_1.jpg