Writing of PPM (Portable Pixmap Format) files
See https://en.wikipedia.org/wiki/Netpbm_format#PPM_example