Turns out ffmpeg understands ppm just fine.

Accordingly, removing the png->ppm conversion