if that image has to be produced directly out of the application (i.e.
having access to all the definitions in the session), this function is
already there. It's the 'Download' button that opens a new window and
just adds the map image to it (before is a dialog to choose the
resolution, but
I might have misunderstood your question slightly. If you need to
produce a map image from/load into a normal web page (without having
pmapper started and all session variables available), you might do that
most easily with the Mapserver CGI functions. There might be some slight
things not