/[libvob]/libvob/lava/bgfilegen.py
ViewVC logotype

Diff of /libvob/lava/bgfilegen.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18 by humppake, Wed May 7 07:56:12 2003 UTC revision 1.19 by humppake, Wed May 7 09:56:29 2003 UTC
# Line 109  def genBgFileFromSeed(w, vs, seed, jpeg= Line 109  def genBgFileFromSeed(w, vs, seed, jpeg=
109    
110      if (jpeg):      if (jpeg):
111          print 'Saving background texture into %s%s-paper.gen.jpg.' % (str(seed), scalePostfix)          print 'Saving background texture into %s%s-paper.gen.jpg.' % (str(seed), scalePostfix)
112          saveanim.saveframe('bgfile.tmp', w, 0, 0, 384, 384)            saveanim.saveframe('bgfile.tmp', w, 0, 0, 384*scale, 384*scale)  
113          os.system("convert -quality 95 %s %s" \          os.system("convert -quality 95 %s %s" \
114                    % ('bgfile.tmp', basedir+str(seed)+'%s-paper.gen.jpg' % (scalePostfix)))                    % ('bgfile.tmp', basedir+str(seed)+'%s-paper.gen.jpg' % (scalePostfix)))
115          os.system("rm bgfile.tmp")          os.system("rm bgfile.tmp")
# Line 117  def genBgFileFromSeed(w, vs, seed, jpeg= Line 117  def genBgFileFromSeed(w, vs, seed, jpeg=
117      else:      else:
118          print 'Saving background texture into %s%s-paper.gen.png.' % (str(seed), scalePostfix)          print 'Saving background texture into %s%s-paper.gen.png.' % (str(seed), scalePostfix)
119          saveanim.saveframe(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix),          saveanim.saveframe(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix),
120                             w, 0, 0, 384, 384)                               w, 0, 0, 384*scale, 384*scale)  
121          return os.path.abspath(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix))          return os.path.abspath(basedir+str(seed)+'%s-paper.gen.png' % (scalePostfix))
122    
123  class Main(Runnable):  class Main(Runnable):
# Line 125  class Main(Runnable): Line 125  class Main(Runnable):
125          global ThePaperMill, w          global ThePaperMill, w
126          from vob.paper.papermill import ThePaperMill          from vob.paper.papermill import ThePaperMill
127    
128          w = gfxapi.createWindow()          # w = gfxapi.createWindow()
129          w.setLocation(0,0,384,384)  
130            # pbuffer
131            w = gfxapi.createStableOffscreen(1536, 1536)
132    
133            #w.setLocation(0,0,384,384)
134          vs = w.createVobScene()          vs = w.createVobScene()
135          print "Working directory:", basedir          print "Working directory:", basedir
136    

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26