summaryrefslogtreecommitdiff
path: root/lib/python2.7/site-packages/wx-3.0-msw/wx/tools/img2png.py
diff options
context:
space:
mode:
authorrahulp132020-03-17 14:55:41 +0530
committerrahulp132020-03-17 14:55:41 +0530
commit296443137f4288cb030e92859ccfbe3204bc1088 (patch)
treeca4798c2da1e7244edc3bc108d81b462b537aea2 /lib/python2.7/site-packages/wx-3.0-msw/wx/tools/img2png.py
parent0db48f6533517ecebfd9f0693f89deca28408b76 (diff)
downloadKiCad-eSim-296443137f4288cb030e92859ccfbe3204bc1088.tar.gz
KiCad-eSim-296443137f4288cb030e92859ccfbe3204bc1088.tar.bz2
KiCad-eSim-296443137f4288cb030e92859ccfbe3204bc1088.zip
initial commit
Diffstat (limited to 'lib/python2.7/site-packages/wx-3.0-msw/wx/tools/img2png.py')
-rw-r--r--lib/python2.7/site-packages/wx-3.0-msw/wx/tools/img2png.py55
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/python2.7/site-packages/wx-3.0-msw/wx/tools/img2png.py b/lib/python2.7/site-packages/wx-3.0-msw/wx/tools/img2png.py
new file mode 100644
index 0000000..5f71b40
--- /dev/null
+++ b/lib/python2.7/site-packages/wx-3.0-msw/wx/tools/img2png.py
@@ -0,0 +1,55 @@
+#----------------------------------------------------------------------
+# Name: wx.tools.img2png
+# Purpose: Convert an image to PNG 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
+#
+
+"""
+img2png.py -- convert several image formats to PNG format.
+
+Usage:
+
+ img2png.py [options] image_files...
+
+Options:
+
+ -o <dir> The directory to place the .png 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 <name> A filename to write the .png data to. Defaults to the
+ basename of the image file + '.png' This option overrides
+ the -o option.
+"""
+
+
+import sys
+import wx
+import img2img
+
+app = None
+def main():
+ # some bitmap related things need to have a wxApp initialized...
+ if wx.GetApp() is None:
+ global app
+ app = wx.App()
+ img2img.main(sys.argv[1:], wx.BITMAP_TYPE_PNG, ".png", __doc__)
+
+if __name__ == '__main__':
+ main()
+
+
+