small enhancement in imagetracer
This commit is contained in:
parent
cc61295afa
commit
e8801a9f32
@ -124,13 +124,16 @@ class Imagetracerjs (inkex.EffectExtension):
|
|||||||
command += " desc " + str(self.options.desc).lower()
|
command += " desc " + str(self.options.desc).lower()
|
||||||
command += " blurradius " + str(self.options.blurradius)
|
command += " blurradius " + str(self.options.blurradius)
|
||||||
command += " blurdelta " + str(self.options.blurdelta)
|
command += " blurdelta " + str(self.options.blurdelta)
|
||||||
|
|
||||||
#inkex.utils.debug(command)
|
|
||||||
|
|
||||||
# Create the vector traced SVG file
|
# Create the vector traced SVG file
|
||||||
with os.popen(command, "r") as tracerprocess:
|
with os.popen(command, "r") as tracerprocess:
|
||||||
result = tracerprocess.read()
|
result = tracerprocess.read()
|
||||||
#inkex.utils.debug(result)
|
if result != "imagetracerjs.png.svg was saved!\n":
|
||||||
|
self.msg("Error while processing input: " + result)
|
||||||
|
self.msg("Check the image file (maybe convert and save as new file) and try again.")
|
||||||
|
self.msg("\nYour parser command:")
|
||||||
|
self.msg(command)
|
||||||
|
|
||||||
|
|
||||||
# proceed if traced SVG file was successfully created
|
# proceed if traced SVG file was successfully created
|
||||||
if os.path.exists(exportfile + ".svg"):
|
if os.path.exists(exportfile + ".svg"):
|
||||||
@ -166,7 +169,7 @@ class Imagetracerjs (inkex.EffectExtension):
|
|||||||
if self.options.keeporiginal is not True:
|
if self.options.keeporiginal is not True:
|
||||||
node.delete()
|
node.delete()
|
||||||
else:
|
else:
|
||||||
inkex.utils.debug("No image found for tracing. Please select an image first.")
|
self.msg("No image found for tracing. Please select an image first.")
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
Imagetracerjs().run()
|
Imagetracerjs().run()
|
Reference in New Issue
Block a user