mirror of
https://github.com/stevenrobertson/cuburn.git
synced 2025-02-05 11:40:04 -05:00
Higher-quality JPEG conversions
This commit is contained in:
parent
e579c837ce
commit
18ca9cf2f9
8
main.py
8
main.py
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from subprocess import Popen
|
||||||
|
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
@ -43,9 +44,10 @@ def main(args):
|
|||||||
anim.load()
|
anim.load()
|
||||||
for n, out in enumerate(anim.render_frames()):
|
for n, out in enumerate(anim.render_frames()):
|
||||||
noalpha = np.delete(out, 3, axis=2)
|
noalpha = np.delete(out, 3, axis=2)
|
||||||
scipy.misc.imsave('rendered_%03d.png' % n, noalpha)
|
name = 'rendered_%03d' % n
|
||||||
scipy.misc.imsave('rendered_%03d.jpg' % n, noalpha)
|
scipy.misc.imsave(name+'.png', noalpha)
|
||||||
|
# Convert using imagemagick, to set custom quality
|
||||||
|
Popen(['convert', name+'.png', '-quality', '90', name+'.jpg'])
|
||||||
return
|
return
|
||||||
|
|
||||||
#if '-g' not in args:
|
#if '-g' not in args:
|
||||||
|
Loading…
Reference in New Issue
Block a user