LOTS of PNG optimizations