The option is working as [documented](https://lilypond.org/doc/v2.25/Documentation/usage/advanced-command_002dline-options-for-lilypond.html) (although the failure mode could be better).
There is simply not "png" backend. The three available backends are "ps" (generates PostScript, and PDF or PNG by conversion through Ghostscript), "svg" (generates SVG only), and, in more recent versions, "cairo" (generates PostScript, PDF, PNG or SVG through the Cairo library). Changing the backend is independent from changing the output format since there can be multiple backends to produce the same format.
signature.asc
Description: This is a digitally signed message part