Commit f345ca0
committed
qubes.GetImageRGBA: fix SVG conversion for images without explicit dimensions
SVGs without explicit width/height cause gm identify to report 0x0.
Pass those dimensions to rsvg-convert only when they are non-zero;
otherwise let rsvg-convert render at the SVG's natural size.
Re-read the actual dimensions from the rendered PNG afterwards so the
forcemaxsize downscale check and the final gm convert use correct values.
Replace echo+cut with read -r for dimension parsing throughout.1 parent 0a67a77 commit f345ca0
1 file changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
28 | 25 | | |
29 | 26 | | |
30 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
0 commit comments