Move filter applying to pngfilters

For speedup by cython