This is driving some development of the interpreter and the API. Now all C devices have their Destroy function called at interpreter exit, where formerly only the window devices were destroyed.
The PNG device will also need extra options from the command-line, and so a general means for this must be added to the API. The current idea is to add a function xpost_add_definitions(char **defs, int n); where defs is an argv-style array in the form "key=value". We can use --def for a long-form option, but I'm not sure what to do for a short-form. -d is select device, and -D is list available devices.
Maybe I can persuade Vincent to add the device list to the --help so we can use -D for definitions.
But the PNG device appears to be working. But only for single-page illustrations. We may incorporate %d in the filename to manage multiple pages with numbered pngs for each one.