I found decent collections of flags in the internet but at the end I decided to build my own, especially in order to overcome problems that arose from the limited resolution of many image collections.
I picked the flags from Wikimedia Commons since they're available in SVG format (a widely used vector image format). This way, if I need to, I can render a flag at any resolution.
I then assembled a GitHub repository where you can find:
- All the flags in SVG format.
- All the flags in PNG format scaled to a width of 256 pixels.
- All the flags in PNG format, scaled to a width of 512 pixels.
The following is a shell script that can be used to render the flags archive at the desired widths.
The script requires librsvg to be installed.