MCPcopy Create free account
hub / github.com/Breakthrough/PySceneDetect / render_svg

Function render_svg

scripts/generate_assets.py:169–184  ·  view source on GitHub ↗

Render an SVG to a PNG at the given dimensions using Inkscape.

(inkscape: str, svg: Path, output: Path, width: int, height: int)

Source from the content-addressed store, hash-verified

167
168
169def render_svg(inkscape: str, svg: Path, output: Path, width: int, height: int):
170 """Render an SVG to a PNG at the given dimensions using Inkscape."""
171 subprocess.run(
172 [
173 inkscape,
174 str(svg),
175 "--export-type=png",
176 f"--export-filename={output}",
177 "-w",
178 str(width),
179 "-h",
180 str(height),
181 ],
182 check=True,
183 capture_output=True,
184 )
185
186
187def render_logos(inkscape: str):

Callers 3

render_logosFunction · 0.85
_render_slateFunction · 0.85
render_all_sizesFunction · 0.85

Calls 1

runMethod · 0.80

Tested by

no test coverage detected