When using an explicit PNG quality, make sure the output is actually using that.

However, if no quality is set, leave it up to ImageMagick to decide on the format.

Fixes Watson bug 3636776