Hi, I'm working on a screen capturing program and I noticed that it takes quite a while for PIL to save PNG images. I ran a profiler on the library and saw that the code that filters the PNG data (lines 133 to 234 in ZipEncode.c) takes about half of the entire compression time. Removing it speeded up the saving considerably and only increased the resulting files by about 25%.
I added an option to the save method called 'no_filter' that prevents the filter code from running. I'm attaching a patch made against the 1.1.6 source kit (http://effbot.org/downloads/Imaging-1.1.6.tar.gz). Maybe somebody will find it useful someday. -- Eli Golovinsky www.testuff.com
pil-png-no_filter.patch
Description: Binary data
_______________________________________________ Image-SIG maillist - Image-SIG@python.org http://mail.python.org/mailman/listinfo/image-sig