summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 601a9da)
raw | patch | inline | side by side (parent: 601a9da)
author | JazzyNico <nicoduf@yahoo.fr> | |
Mon, 9 Aug 2010 18:07:37 +0000 (20:07 +0200) | ||
committer | JazzyNico <nicoduf@yahoo.fr> | |
Mon, 9 Aug 2010 18:07:37 +0000 (20:07 +0200) |
share/extensions/gimp_xcf.py | patch | blob | history |
index 92da6cf40ff04c7b18deace6fe7d4f7545a37ec5..b849d948ad25940988a42b3f705627f800252f9e 100755 (executable)
def effect(self):
svg_file = self.args[-1]
docname = self.xpathSingle('/svg:svg/@sodipodi:docname')[:-4]
- pageHeight = int(self.xpathSingle('/svg:svg/@height').split('.')[0])
- pageWidth = int(self.xpathSingle('/svg:svg/@width').split('.')[0])
+ pageHeight = int(inkex.unittouu(self.xpathSingle('/svg:svg/@height').split('.')[0]))
+ pageWidth = int(inkex.unittouu(self.xpathSingle('/svg:svg/@width').split('.')[0]))
#create os temp dir
tmp_dir = tempfile.mkdtemp()
path = "/svg:svg/*[name()='g' or @style][@id]"
for node in self.document.xpath(path, namespaces=inkex.NSS):
id = node.get('id')
- name = "%s.png" % id
- filename = os.path.join(tmp_dir, name)
+ filename = os.path.join(tmp_dir, "%s.png" % id)
command = "inkscape -i %s -j %s -e %s %s " % (id, area, filename, svg_file)
if bsubprocess:
p = Popen(command, shell=True, stdout=PIPE, stderr=PIPE)