selfdrive/assets: rasterize SVGs (#35243)

* selfdrive/assets: rasterize SVGs

* do entire assets dir

* fixed size - 4096px is a lot

* optimise them too

* use inkscape

* regenerate

* abandon runtime svg
This commit is contained in:
Cameron Clough
2025-05-16 01:33:16 +01:00
committed by GitHub
parent 62f5a59f77
commit 83679bd856
22 changed files with 77 additions and 11 deletions
+1 -8
View File
@@ -80,10 +80,7 @@ class GuiApplication:
def _load_texture_from_image(self, image_path: str, width: int, height: int, alpha_premultiply = False, keep_aspect_ratio=True):
"""Load and resize a texture, storing it for later automatic unloading."""
if image_path.endswith('.svg'):
image = self._load_image_from_svg(image_path)
else:
image = rl.load_image(image_path)
image = rl.load_image(image_path)
if alpha_premultiply:
rl.image_alpha_premultiply(image)
@@ -112,10 +109,6 @@ class GuiApplication:
rl.unload_image(image)
return texture
def _load_image_from_svg(self, svg_path: str):
# TODO: Implement SVG loading
assert(0)
def close(self):
if not rl.is_window_ready():
return