I'm really confused here. How does png2base64 even get called? Are we execing a separate Node process from the PS side. It seems to be the case that this is what's going on. Am I correct?

It seems like what we should do is request the png through the regular channel (i.e. how we do non-SVG generation) and then just base64 encode what comes across the wire. So, we should be calling getLayerPixmap. To do this, we'll need to move more of the SVG creation logic out of ES, though.