mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Fix flicker (and a few other things).
This commit is contained in:
parent
9b03f557c2
commit
72ca02032a
10
main.py
10
main.py
@ -35,6 +35,7 @@ os.environ['PATH'] = ('/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.5:'
|
||||
def main(args):
|
||||
if '-t' in args:
|
||||
MWCTest.test_mwc()
|
||||
return
|
||||
|
||||
with open(args[1]) as fp:
|
||||
genome_ptr, ngenomes = pyflam3.Genome.from_string(fp.read())
|
||||
@ -44,14 +45,17 @@ def main(args):
|
||||
anim.compile(keep=True,
|
||||
cmp_options=('-use_fast_math', '-maxrregcount', '32', '-G'))
|
||||
else:
|
||||
anim.compile()
|
||||
anim.compile(keep='-k' in args)
|
||||
anim.load()
|
||||
for n, out in enumerate(anim.render_frames()):
|
||||
noalpha = np.delete(out, 3, axis=2)
|
||||
name = 'rendered_%03d' % n
|
||||
scipy.misc.imsave(name+'.png', noalpha)
|
||||
name = 'rendered_%05d' % n
|
||||
scipy.misc.toimage(noalpha, cmin=0, cmax=1).save(name+'.png')
|
||||
|
||||
if '-j' in args:
|
||||
# Convert using imagemagick, to set custom quality
|
||||
Popen(['convert', name+'.png', '-quality', '90', name+'.jpg'])
|
||||
print 'saved', name, np.min(noalpha), np.max(noalpha)
|
||||
return
|
||||
|
||||
#if '-g' not in args:
|
||||
|
Loading…
Reference in New Issue
Block a user