PPM
means (p)ortable (p)ix(m)ap
Format specification: https://netpbm.sourceforge.net/doc/ppm.html
It’s text format with structure like <label> <width> <height> <max_value> (<red> <green> <blue>)
I am using “Plain PPM” for my experiments. It means <label>
is P3
and color component values are encoded as decimals in ASCII.
This snippet conforms to specification. It’s opened without problems by Xviewer:
P3 1 1 255 0 255 255
Sublime 4180 correctly believes it is image but fails to display it. I have to “Reopen File as Text” every time.
I believe it’s not hard to parse integers from string in Python. If not, just display it as text.
(Despite this minor issue your project is great! Using it for over 10 years.)
Best regards, Martin