color handling fix in imagetracer.js

This commit is contained in:
Mario Voigt 2021-05-15 20:15:58 +02:00
parent 066674b658
commit c20ff0335d

View File

@ -97,6 +97,9 @@ class Imagetracerjs (inkex.EffectExtension):
exportfile = "imagetracerjs.png" exportfile = "imagetracerjs.png"
else: else:
exportfile ="/tmp/imagetracerjs.png" exportfile ="/tmp/imagetracerjs.png"
if img.mode != 'RGB':
img = img.convert('RGB')
img.save(exportfile, "png") img.save(exportfile, "png")
nodeclipath = os.path.join("imagetracerjs-master", "nodecli", "nodecli.js") nodeclipath = os.path.join("imagetracerjs-master", "nodecli", "nodecli.js")