Open bennoleslie opened 9 years ago
Note: These issues are fixed in this branch: https://github.com/bennoleslie/pngcanvas/tree/fix-defilter-code-path however that depends on existing pull-requests to be merged.
Since the PR is merged, let's move forward with these patches too?
The defilter code is not correct.
Identified issues:
1/ There is a badly indented 'else' clause. 2/ The defilter code does in place modification of row-data, but is passed an immutable tuple. 3/ The filter type is incorrectly passed, it should use the filter byte at the start of the scan line not the one in the header. 4/ The averaging algorithm is broken.