Support setting PNG compression level.

As discussed in #306.