PIL does not support iTXt PNG chunks [patch]

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

PIL does not support iTXt PNG chunks [patch]

Paul Sladen-6
(Forwarded from:  http://bugs.python.org/issue13514  per Ezio Melotti)

The Python Imaging Library does not support handling of UTF-8 'iTXt'
key:value chunks in PNG files:


Such support is necessary for successful extraction of key:value pairs
of UTF-8 encoded data, stored in an PNG 'iTXt' comment chunk.

The following example file (from British GCHQ) demonstrates such a
record in a PNG file.  Based on this evidence, it is highly likely
that GCHQ hide all of their important secrets using this kind of
steganography, and likely necessary that spies from the rest of the
world are requiring similar access to GCHQ secrets.  Inclusion of a
working chunk_iTXt() PIL/PNG support function will enable more
harmonious and effective eavesdropping.  Example image:


(The attached .py file is not a directly apply-able patch, but
contains a working implementation for chunk_iTXt() and a demonstrative
test function for inserting it).


Image-SIG maillist  -  [hidden email]

chunk_iTXt.py (1K) Download Attachment