Options:
- -o <dir> The directory to place the .xmp file(s), defaults to
+ -o <dir> 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
import sys, os, glob, getopt, string
from wxPython.wx import *
+
wxInitAllImageHandlers()
if img.SaveFile(newname, wxBITMAP_TYPE_XPM):
return 1, file + " converted to " + newname
else:
- return 0, file + " failed to save!"
+ img = wxImageFromBitmap(img)
+ if img.SaveFile(newname, wxBITMAP_TYPE_XPM):
+ return 1, "ok"
+ else:
+ return 0, file + " failed to save!"