X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1fded56b375bf7a4687af1cdb182899614c1b2a8..4276dc529d44f9107748f2ed6ca36f8ddfce12f4:/wxPython/wx/tools/img2xpm.py
diff --git a/wxPython/wx/tools/img2xpm.py b/wxPython/wx/tools/img2xpm.py
index ec59eb7a76..97c6d6061d 100644
--- a/wxPython/wx/tools/img2xpm.py
+++ b/wxPython/wx/tools/img2xpm.py
@@ -1,11 +1,55 @@
+#----------------------------------------------------------------------
+# Name: wxPython.tools.img2xpm
+# Purpose: Convert an image to XPM format
+#
+# Author: Robin Dunn
+#
+# RCS-ID: $Id$
+# Copyright: (c) 2002 by Total Control Software
+# Licence: wxWindows license
+#----------------------------------------------------------------------
+# 12/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
+#
+# o V2.5 compatability update
+#
+
+"""
+img2xpm.py -- convert several image formats to XPM
+
+Usage:
+
+ img2xpm.py [options] image_files...
+
+Options:
+
+ -o
The directory to place the .xpm file(s), defaults to
+ the current directory.
+
+ -m <#rrggbb> If the original image has a mask or transparency defined
+ it will be used by default. You can use this option to
+ override the default or provide a new mask by specifying
+ a colour in the image to mark as transparent.
+
+ -n A filename to write the .xpm data to. Defaults to the
+ basename of the image file + '.xpm' This option overrides
+ the -o option.
+"""
+
+import sys
+
+import wx
+
+import img2img
+
+def main():
+ # some bitmap related things need to have a wxApp initialized...
+ if wx.GetApp() is None:
+ app = wx.PySimpleApp()
+ img2img.main(sys.argv[1:], wx.BITMAP_TYPE_XPM, ".xpm", __doc__)
+
+
+if __name__ == '__main__':
+ main()
-"""Renamer stub: provides a way to drop the wx prefix from wxPython objects."""
-__cvsid__ = "$Id$"
-__revision__ = "$Revision$"[11:-2]
-from wx import _rename
-from wxPython.tools import img2xpm
-_rename(globals(), img2xpm.__dict__, modulename='tools.img2xpm')
-del img2xpm
-del _rename