]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/wx/tools/img2png.py
1 #----------------------------------------------------------------------
2 # Name: wxPython.tools.img2png
3 # Purpose: Convert an image to PNG format
8 # Copyright: (c) 2002 by Total Control Software
9 # Licence: wxWindows license
10 #----------------------------------------------------------------------
11 # 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
13 # o V2.5 compatability update
17 img2png.py -- convert several image formats to PNG format.
21 img2png.py [options] image_files...
25 -o <dir> The directory to place the .png file(s), defaults to
26 the current directory.
28 -m <#rrggbb> If the original image has a mask or transparency defined
29 it will be used by default. You can use this option to
30 override the default or provide a new mask by specifying
31 a colour in the image to mark as transparent.
33 -n <name> A filename to write the .png data to. Defaults to the
34 basename of the image file + '.png' This option overrides
45 # some bitmap related things need to have a wxApp initialized...
46 if wx
.GetApp() is None:
47 app
= wx
.PySimpleApp()
48 img2img
.main(sys
.argv
[1:], wx
.BITMAP_TYPE_PNG
, ".png", __doc__
)
50 if __name__
== '__main__':