10 |
f = FileOutputStream("img.tmp") |
f = FileOutputStream("img.tmp") |
11 |
SaveImage.writeBytesRGB(f, pixels) |
SaveImage.writeBytesRGB(f, pixels) |
12 |
f.close() |
f.close() |
13 |
|
print "To system" |
14 |
os.system("rawtoppm %(w)s %(h)s img.tmp | convert - %(filename)s" % locals()) |
os.system("rawtoppm %(w)s %(h)s img.tmp | convert - %(filename)s" % locals()) |
15 |
|
print "Done system" |
16 |
#os.system("rawtoppm %(w)s %(h)s img.tmp | ppmtojpeg > %(filename)s" % locals()) |
#os.system("rawtoppm %(w)s %(h)s img.tmp | ppmtojpeg > %(filename)s" % locals()) |
17 |
# ppmtojpeg is a bit faster than convert |
# ppmtojpeg is a bit faster than convert |