decodeSvg returns straight alpha

This commit is contained in:
Ryan Oldenburg 2021-01-25 11:17:34 -06:00
parent 2c7694896f
commit a63bc4d1be
2 changed files with 1 additions and 2 deletions

View file

@ -236,6 +236,7 @@ proc decodeSvg*(data: string): Image =
result = newImage(width, height)
for node in root:
result.draw(node, ctxStack)
result.toStraightAlpha()
except PixieError as e:
raise e
except:

View file

@ -19,7 +19,5 @@ for file in files:
image = decodeSvg(original)
gold = readImage(&"tests/images/svg/{file}.png")
image.toStraightAlpha()
doAssert image.data == gold.data
#image.writeFile(&"tests/images/svg/{file}.png")