Hi Gilleain and Andreas,

This is what I use to save information about the image.  I redefine the png command.


from pymol import cmd
import os
import re
import string
import selector


def __init__(self):
cmd.extend('png',mypng)

def mypng(fname, quiet=1):
r = 1
format = 'vew'
cmd.png(fname, quiet)

if re.search("\.png$",fname):
         fname = re.sub("\.png$","",fname)
fname = fname + ".vew"
fname = os.path.expanduser(fname)
fname = os.path.expandvars(fname)
f=open(fname,"w")
f.write("#View matrix for " + fname + "\n")
st = cmd.get_view(output=3)
f.write(st)
f.close()
return r

cmd.extend('png',mypng)


This command will use the name that you specify for the png file to also output all of the view matrix to a file that is saved with the .vew extension.  The png file is saved as usual.  This idea could be expanded to save other things to the meta file (object information).

-Mark

_________________________________
Mark A. Saper, Ph.D.
Associate Professor of Biological Chemistry
Biophysics Research Division, University of Michigan 
Chemistry Building Room 3040
930 N University Ave
Ann Arbor MI 48109-1055 U.S.A.

saper@umich.edu        (734) 764-3353        fax (734) 764-3323
http://www.biochem.med.umich.edu/biochem/research/profiles/saper.html
Biophysics Interdepartmental Graduate Program: http://www.umich.edu/~biophys