adding code from pngquant. Optimizes image and prints to stdout now