]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/tools/XRCed/encode_bitmaps.py
   2 A simple script to encode all the images the XRCed needs into a Python module 
   6 from wx
.tools 
import img2py
 
  11     # get the list of PNG files 
  12     files 
= glob
.glob('src-images/*.png') 
  15     # Truncate the inages module 
  18     # call img2py on each file 
  21         # extract the basename to be used as the image name 
  22         name 
= os
.path
.splitext(os
.path
.basename(file))[0] 
  26             cmd 
= "-u -i -n %s %s %s" % (name
, file, output
) 
  28             cmd 
= "-a -u -i -n %s %s %s" % (name
, file, output
) 
  29         img2py
.main(cmd
.split()) 
  32 if __name__ 
== "__main__":