From a63bc4d1be6b977de4f8494315ad4eec2d30b466 Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Mon, 25 Jan 2021 11:17:34 -0600 Subject: [PATCH] decodeSvg returns straight alpha --- src/pixie/fileformats/svg.nim | 1 + tests/test_svg.nim | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pixie/fileformats/svg.nim b/src/pixie/fileformats/svg.nim index 1ec6eec..381f4c5 100644 --- a/src/pixie/fileformats/svg.nim +++ b/src/pixie/fileformats/svg.nim @@ -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: diff --git a/tests/test_svg.nim b/tests/test_svg.nim index 7088318..2d09953 100644 --- a/tests/test_svg.nim +++ b/tests/test_svg.nim @@ -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")