I'm trying to produce a masked SVG image for better quality, but the resulting image lack the contour line.
Steps/Code to Reproduce
Use this example to create the svg image
from PIL import Image
import numpy as np
from wordcloud import WordCloud
with open('examples/alice_license.txt', encoding='UTF8') as f:
text = f.read()
mask = np.array(Image.open("examples/alice_mask.png"))
wordcloud = WordCloud(
background_color="white",
mask=mask).generate(text)
svg_image = wordcloud.to_svg(embed_font=True)
with open("alice.svg", "w+", encoding='UTF8') as f:
f.write(svg_image)
Expected Results
An SVG image with contour line.
Actual Results
see this image produced with the example code above:
Description
I'm trying to produce a masked SVG image for better quality, but the resulting image lack the contour line.
Steps/Code to Reproduce
Use this example to create the svg image
Expected Results
An SVG image with contour line.
Actual Results
see this image produced with the example code above:
Versions