Simple python script to overlay two flags on top of each other
Run python flag-merge.py
in a directory containing at least two images (.png extension only but you can modify the code to allow any/all extensions).
This will create a subdirectory ./output/
containing all of the possible combination images.
http://flagpedia.net/download has nice archives available for download containing flags of countries of the world.