Some of these flags have been obtained using sodipodi to convert the sodipodi flags 
collection from svg to png and then modified a bit (sorry) to be of similar sizes.
Sodipodi flags collection can be found at 
https://web.archive.org/web/20080116221835/http://www.sodipodi.com/index.php3?section=clipart/flags
Those flags are licensed under the Creative Commons Public Domain license.

Other flags have been obtained from flagpedia under the public domain license.
Flagpedia can be found at
https://flagpedia.net

The rest have been obtained from www.wikipedia.org
