Make a complete PNM file from an image.
encode_binary () and encode_ascii ()
uses the most optimized encoding for this image (bitmap, grey
or truecolor) - P4, P5 or P6 respective P1, P2 or P3.
encode_P1 /encode_P4
assumes the image is black and white. Use
Image.Image->threshold () or something like
Image.Colortable ( ({({0,0,0}),({255,255,255})}) )
->floyd_steinberg()
->map(my_image)
to get a black and white image.
encode_P2 /encode_P5 assumes the image is greyscale. Use
Image.Image->grey () to get a greyscale image.