One-liner Country Flags

This started as a joke with a colleague, but it's kind of a fun exercise.

Poland

        convert -size 300x100 xc:red xc:white -append poland.jpg
      

Italy

        convert -size 200x100 xc:red xc:white xc:green -append -rotate 90 italy.jpg
      

Scotland

        convert -size 300x200 xc:blue -stroke white  -strokewidth 40 -draw "line 0,0 300,200" -draw "line 300,0 0,200" scotland.jpg
      

United Kingdom

First pass.

        
convert -size 400x200 xc:blue \
  -stroke white -strokewidth 30 -draw "line 0,0 400,200" -draw "line 400,0 0,200" \
  -stroke red -strokewidth 10 -draw "line -10,0 200,105" -draw "line 410,-10 200,95" \
                              -draw "line 0,205 200,105" -draw "line 410,200 200,95" \
  -stroke white -strokewidth 50 -draw "line 0,100 400,100" -draw "line 200,0 200,200" \
  -stroke red -strokewidth 30 -draw "line 0,100 400,100" -draw "line 200,0 200,200" \
  uk.jpg
        
      

Alternatively, we can get creative and draw one corner and use some rotations to reduce the number of draws we need.

        
          convert -size 200x100 xc:blue \
            -stroke white -strokewidth 30 -draw "line 0,0 200,100" \
            -stroke red -strokewidth 10 -draw "line -10,0 200,105" \
            \( +clone -rotate 180 -flop \) +append \
            -stroke white -strokewidth 50 -draw "line 0,100, 400,100" -draw "line 200,0 200,100" \
            -stroke red -strokewidth 30 -draw "line 0,100 400,100" -draw "line 200,0 200,100" \
            \( +clone -rotate 180 \) -append uk.jpg