summaryrefslogtreecommitdiff
path: root/import_tools/pov2png.py
blob: d2c11700caf6dc973990cd24d84a270d59c9f801 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python
#pov2png.py input.pov output.png
#TODO: automatically figure out the proper dimensions of the resulting image
import skdb.thirdparty.optfunc as optfunc
import os

def pov2png(pov_file, png_file):
    '''usage: %prog <pov_file> <png_file>
    converts from pov to a png file'''
    print "pov2png: starting"
    print "pov_file is: ", pov_file
    print "png_file is: ", png_file
    os.system("povray -d %s +O%s" % (pov_file, png_file))
    print "pov2png: done"

if __name__ == "__main__":
    optfunc.run(pov2png)