Remove unused code from pngwriter.py