Kozea / Kozea/CairoSVG

SVGs render to an empty PNG

Open
#399 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
951
Forks
166
PR merge metrics
No merged PRs in 30d

Description

I have a couple of SVG files that I wish to convert to PNG or JPEG - doesn't matter really. Unfortunately, whenever I try to render them to JPG or PNG using CairoSVG, the pictures are empty (contain nothing). I am not sure where the issue is, but actually, when I try to do it online using any other SVG -> PNG tools, the same thing happens. Would love some guidance as to why this is happening.

I have included three SVG files here as an example that you can see in SVG-Viewer.

[N-Sqaured](https://www.svgviewer.dev/s/i90w8yIl)
[Additions](https://www.svgviewer.dev/s/WG1fubcd)
[3x3](https://www.svgviewer.dev/s/nOUOc6TW)

So, yeah - what could be the reason for this issue?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the empty PNG/JPEG output with the three linked SVG examples using CairoSVG, then compare the rendered result with the SVG viewer output. Inspect the issue discussion for any identified SVG features or constraints; done means documenting the confirmed cause and a reproducible fix or clear limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.