Commit 659239b
committed
qubes.GetImageRGBA: fix SVG conversion for images without explicit dimensions
SVGs that specify dimensions only via viewBox (no explicit pixel
width/height attributes) cause gm identify to return 0 for both
width and height. Passing -w 0 -h 0 to rsvg-convert produces an
empty or corrupt PNG, which then causes the second gm identify to
fail with 'No decode delegate for this image format'.
When gm identify returns zero or empty dimensions for an SVG, let
rsvg-convert determine the natural size from the viewBox instead.
The actual dimensions are then read from the resulting PNG by the
existing gm identify call that follows.
Fixes: QubesOS/qubes-issues#91451 parent 0a67a77 commit 659239b
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
0 commit comments