#1237·diagrams

Azure icon conversion: config.py, CONTRIBUTING.md and practice specify three different converters

Author: filipeaaoliveiraCreated Aug 9, 2026Updated Aug 9, 2026

Three places in the repo say how Azure SVGs become PNGs, and they disagree.

config.py:41-42 sets the converter to inkscape with ("-w", "256", "-h", "256", "--export-type", "png"). CONTRIBUTING.md:63 tells contributors to run inkscape -h 256. Those two differ in more than spelling: passing both -w and -h pins the output to 256x256, while -h on its own keeps the source aspect ratio. PR #1204 used a third tool, rsvg-convert.

Only scripts/resource.py svg2png reads config.py, and it runs for onprem and azure. Anyone following the Azure section of CONTRIBUTING.md by hand, which is what those instructions tell you to do, never touches that code path.

This matters more than it looks, because the converter leaks into the committed bytes. The source SVGs are deleted after conversion (scripts/resource.py:198), so the PNG is the only artifact we keep, and two rasterisers produce different files from the same input even when the visible artwork is identical. In #1204 that produced 632 modified icons with one genuine visual change between them. Whoever does the next Azure refresh with a different tool will churn several hundred files back the other way.

Worth deciding:

  • Which converter we standardise on. rsvg-convert installs more easily than Inkscape and has a saner CLI, which is presumably why #1204 reached for it.
  • Whether output should be forced to 256x256 or keep aspect ratio. The repo currently holds both, including a few icons that are neither square nor 256 on their long edge.

Then update config.py and the Azure section of CONTRIBUTING.md so they agree, and point those instructions at autogen.sh instead of a separate hand-rolled find command.

Related: #1204, #1238.