Fix regressions in PNG filter
Fix regressions in PNG filter

Fixes #305.  This partially reverts #298, but keeps the correct parts.

JaySon-Huang/image,huonw/image,ruud-v-a/image,bvssvni/image,tomaka/image,theotherphil/image,twoodford/image,lady-segfault/image,dtwood/piston-image,PistonDevelopers/image,PistonDevelopers/image,TyOverby/rust-image,nwin/rust-image,hetzge/image,mbrubeck/image