Render an SVG to a PNG at the given dimensions using Inkscape.
(inkscape: str, svg: Path, output: Path, width: int, height: int)
| 167 | |
| 168 | |
| 169 | def 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 | |
| 187 | def render_logos(inkscape: str): |
no test coverage detected