-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Addition of Flate PNG reverse filters: Up, Average and Paeth * Notes to run test-cases * flate_png tests with filters * Reverse filters are applied to every pixel except the first of each scanline. Fix dict key. * Apply filter to the whole scanline * Reverting to original flate_png to assert all tests pass * When flate_png_orig returns error, data is None * Can't use print in python 3 * Can't use print in python 3 * import correct xrange based on python version * During flate_png reconstruction, previous row must be the previous scanline reconstructed * subfilter must read the same byte from pixel to its left: https://www.w3.org/TR/2003/REC-PNG-20031110/#9FtIntro * Addition of tests for flate_png_impl: flate_png_impl doesn't do array to X conversion but instead it returns array.array('B') * Fix flate_png_impl tests for filters 2 (sub), 3 (avg), and 4 (paeth) as they require at least 2 scanlines. Simplify UP filter. * Use ord() when applicable * Remove debugging code * Tests for flate_png_impl using http://www.schaik.com/pngsuite/pngsuite_fil_png.html f01n2c08, f02n2c08, f03n2c08, f04n2c08 * Missing png.log files * Fix file path for local .png.log files * Simplify filters and add more tests * Addition of Jupyter IPython notebook capable of rendering buffers (rasters) used/produced by test_flate_png.py tests: requires matplotlib * Comments on ipython notebook * Assert that flate_png_orig produced different output (yet correct looking PDF War of the Worlds) when png data was compressed and filtered using Sub (f=1). New flate_png also generates correct looking PDF War of the Worlds. * Cleanup: remove flate_png_orig, update expected.txt checksums, and add basn0g08.png.log and its test * Remove Encrypt check from test_roundtrip. If 'expected.txt' has a valid hash, the test is expected to pass and produce a file with same hash. Revert all PDFs with Encrypted content to 'skip' because the roundtrip PDF is 'blank'
- Loading branch information
Showing
14 changed files
with
2,817 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.