png: allow encoding 16-bit grayscale