text:
Draw the national flag of Iceland
This year's UEFA Euro 2016 is over and besides a couple of negative headlines there has been a very positive surprise as well – the Iceland national football team. Let's draw their national flag.
Input
Well, obviously this challenge has no input.
Output

Draw the flag of Iceland in any applicable visual format of at least 100 x 72 pixels or 25 x 18 characters.
Save the output to a file or present it instantly – example formats are: images like png, jpg etc., vector graphics, draw on HTML canvas or even use non-whitespace characters for visualization.
Use these colors: blue: #0048e0, white: #ffffff and red: #d72828.
If your language doesn't support specific color values, use the standard values for red, blue and white from the ANSI color codes.
Draw the flag with the correct proportions, as shown in the figure below:

Boilerplate

You can write a program or a function. If it is an anonymous function, please include an example of how to invoke it.
This is code-golf so shortest answer in bytes wins.
Standard loopholes are disallowed.

Leaderboard

var QUESTION_ID = 85141; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 41859; // This should be the user ID of the challenge author.
var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;function answersUrl(index) {return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;}function commentUrl(index, answers) {return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;}function getAnswers() {jQuery.ajax({url: answersUrl(answer_page++),method: "get",dataType: "jsonp",crossDomain: true,success: function (data) {answers.push.apply(answers, data.items);answers_hash = [];answer_ids = [];data.items.forEach(function(a) {a.comments = [];var id = +a.share_link.match(/\d+/);answer_ids.push(id);answers_hash[id] = a;});if (!data.has_more) more_answers = false;comment_page = 1;getComments();}});}function getComments() {jQuery.ajax({url: commentUrl(comment_page++, answer_ids),method: "get",dataType: "jsonp",crossDomain: true,success: function (data) {data.items.forEach(function(c) {if (c.owner.user_id === OVERRIDE_USER)answers_hash[c.post_id].comments.push(c);});if (data.has_more) getComments();else if (more_answers) getAnswers();else process();}});}getAnswers();var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(-?\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;var OVERRIDE_REG = /^Override\s*header:\s*/i;function getAuthorName(a) {return a.owner.display_name;}function process() {var valid = [];answers.forEach(function(a) {var body = a.body;a.comments.forEach(function(c) {if(OVERRIDE_REG.test(c.body))body = '
' + c.body.replace(OVERRIDE_REG, '') + '
';});var match = body.match(SCORE_REG);if (match)valid.push({user: getAuthorName(a),size: +match[2],language: match[1],link: a.share_link,});});valid.sort(function (a, b) {var aB = a.size,bB = b.size;return aB - bB});var languages = {};var place = 1;var lastSize = null;var lastPlace = 1;valid.forEach(function (a) {if (a.size != lastSize)lastPlace = place;lastSize = a.size;++place;var answer = jQuery("#answer-template").html();answer = answer.replace("{{PLACE}}", lastPlace + ".").replace("{{NAME}}", a.user).replace("{{LANGUAGE}}", a.language).replace("{{SIZE}}", a.size).replace("{{LINK}}", a.link);answer = jQuery(answer);jQuery("#answers").append(answer);var lang = a.language;if (! /<a/.test(lang)) lang = '' + lang + '';lang = jQuery(lang).text().toLowerCase();languages[lang] = languages[lang] || {lang: a.language, user: a.user, size: a.size, link: a.link, uniq: lang};});var langs = [];for (var lang in languages)if (languages.hasOwnProperty(lang))langs.push(languages[lang]);langs.sort(function (a, b) {if (a.uniq > b.uniq) return 1;if (a.uniq < b.uniq) return -1;return 0;});for (var i = 0; i < langs.length; ++i){var language = jQuery("#language-template").html();var lang = langs[i];language = language.replace("{{LANGUAGE}}", lang.lang).replace("{{NAME}}", lang.user).replace("{{SIZE}}", lang.size).replace("{{LINK}}", lang.link);language = jQuery(language);jQuery("#languages").append(language);}}
body { text-align: left !important}#answer-list {padding: 10px;width: 290px;float: left;}#language-list {padding: 10px;width: 290px;float: left;}table thead {font-weight: bold;}table td {padding: 5px;}
<link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/Sites/codegolf/all.css?v=617d0685f6f3">

Leaderboard

	Author	Language	Size

Winners by Language

Language	User	Score

{{PLACE}}	{{NAME}}	{{LANGUAGE}}	{{SIZE}}

{{LANGUAGE}}	{{NAME}}	{{SIZE}}

If you can't find your answer, format your language and byte count as explained in the Leaderboard's "Info Section".

This challenge is inspired by Draw the national flag of france.

Related, Related, Related

Far more challenging would be the flag of my country, who also did a lot better than expected in the Euros this year - Wales. :-)

@Gareth I'm looking forward to a waterproof specification of the dragon. ;)

It looks like the blue in the above image is darker than the actual #0048e0

is this output valid?

@GiacomoGarabello Yes, it is.

@LuisMendo Both, the approximately color values and the image are from Wikipedia, so they may differ slightly. The image is mainly to show the proportions. Please use the colors from the question as copied from this link.

@MartinEnder Does carving it on a stone tablet count? That's waterproof.

@MartinEnder Mathematica will have one.

Are you sure you want one character to be one unit? 100x72 characters seems very big and there are answers below which actually have smaller flags. Could you please clarify?

@insertusernamehere This is still inconsistent with Giacomo Garabello's answer, which you declared as valid.

@Kritzefitz Ob boy, I see it now. I miscounted the lines - actually his answer misses 4 lines. Good catch. Will get in touch with him. Looking at so many similar answers and checking proportions can be confusing.

Actually, outdated version of Leaderboard installed. But I see I'm the only annoyed by the lack of stylesheet.

There is no official up to date version. You either edit the CSS path manually, or use the suggested version I posted in an answer, but which contains other changes too.

Congratulations on your gold badge!

@LuisMendo Thanks a lot. I'm still overwhelmed by the sheer amount of responses and people participating in this challenge, whether with own submissions or by helping others to improve their answers.

Looks like victories for assembly languages, von Neumann would be proud

Why are assembly program sizes listed below measured by the output of the assembler, not by the assembler source (10x larger)?  Is this part of some FAQ?  I.e. if my Java *.class file is smaller than my *.java source file, can I just hexdump the *.class file and claim the smaller byte count?  I mean, if they painstakenly wrote their solutions in hex and then disassembled them for our convenience, that's one thing.  But it looks like they wrote them in assembler so shouldn't that be what's measured?

Python 3, 190 172 171 169 167 160 159 147 143 bytes
Using PIL version 1.1.7 which has a deprecated but not removed offset method.
from PIL.ImageDraw import*
i=Image.new('RGB',(25,18),'#d72828')
Draw(i).rectangle((1,1,23,16),'#0048e0',~0)
i.offset(9).resize((100,72)).show()

Creates a 25*18 pixel image filled with red then draws a 23*16 pixel rectangle filled with blue with white outline of one pixel. It then offsets the image by (9,9) which wraps on the edges, resizes it to 100*72 then shows it in a window.
Flag before offsetting:
 (resized to 100*72)
Output:

Animated:

Edit1: Golfed 18 bytes by removing the cropping by initially creating a 25*18 image.
Edit2: Golfed 1 byte by using #fff instead of white.
Edit3: Golfed 2 bytes by aliasing imports.
Edit4: Golfed 2 bytes by removing the second argument of the offset method .
Edit5: Golfed 7 bytes by showing the image instead of saving. (needs imagemagick installed on Unix)
Edit6: Golfed 1 byte by rewriting imports.
Edit7: Golfed 12 bytes by rewriting imports again. (thanks by @Dennis)
Edit8: Added animation.
Edit9: Updated animation as it was missing the last frame.
Edit10: Golfed 4 bytes thanks to Albert Renshaw!

Which PIL version? With 3.1.2 I get “Exception: offset() has been removed. Please call ImageChops.offset() instead.”

I'm using Pillow version 2.3.0 which has PIL version 1.1.7.
The offset method has been moved to the ImageChops module in PIL 1.2.

Oh. Sorry, not familiar with Python graphics in general. Pillow 3.1.2's PIL 1.1.7 is the one that give the error: http://pastebin.com/nBXaw8Xe Well, probably depends on the build options used by the package maintainers (I'm on Ubuntu Xenial).

Really nice answer.

Excellent solution. I was trying to think of a block-matrix type approach in Mathematica, but this is much better. The similar solution in MMA amounts to 110 bytes: Image[RotateRight[a[Table[2,56,84],4,1]~(a=ArrayPad)~4/.{2->8{0,9,28}, 1->255{1,1,1},0->5{43,8,8}},4{9,9}]/255]

This is genius! (Viking)Hat off to you.

Wow, it's rare that I vote on code-golf type questions on SO, but it's even rarer that I'll join a whole new community just to do so. This offset hack is reminiscent  of what we used to have to do before you young whippersnappers got your oodlebytes of memory to work with. Excellent job.

genius,really!

I think it may be possible to save a byte by omitting the o in o.png.

I changed it to show instead of saving but your idea won't work because a valid filename is required for saving and .png isn't one.

Can't you do from PIL import* and then use Image instead of I and ImageDraw instead of D?

Already tried that but it seems that PIL doesn't include submodules in the __all__ variable. This means no starred import :(

If you do from PIL.ImageDraw import*, I becomes Image and D.Draw becomes Draw, saving 11 bytes.

Thank you, it worked! But I counted 12 bytes instead of 11.

Replace '#fff' with ~0 to save 4 more bytes ;) (*Note, I removed the apostrophes as well, just ~0 not '~0')

Thanks! It also works with -1 which equals to your solution.

x86 real-mode machine code for DOS COM, 69 65 63 62 bytes

The code is meant to be executed as a DOS COM executable.
Special thanks

meden, saved four bytes.
meden, saved two bytes and removed the flickering.

Machine code (in hex bytes)
68 00 A0 07 B8 13 00 CD      10 BE 23 01 AD 91 AD 91
AC E3 FE 60 30 ED F3 AA      61 81 C7 40 01 FE CD 75
F2 EB E9 FA B4 00 00 09      28 B4 46 00 0F FA 28 80
57 0F 14 B4 0C 50 00 FA      14 0C 00 64 00 00

Assembly source
Source is for NASM.
ORG 100h

push 0a000h
pop es

mov ax, 13h
int 10h

mov si, data

_draw:
 lodsw
 xchg ax, cx

 lodsw
 xchg ax, di

 lodsb

_cycle:
 jcxz _cycle

 ;al = color
 ;cl = col
 ;ch = row

rect:
 pusha
 xor ch, ch
 rep stosb
 popa
 add di, 320
 dec ch
 jnz SHORT rect

jmp SHORT _draw

data:

        db 250d
        db 180d
        dw 0000h
        db 09h

        db 40d
        db 180d
        dw 0070d
        db 0fh

        db 250d
        db 40d
        dw 22400d
        db 0fh

        db 20d
        db 180d
        dw 80d
        db 0ch

        db 250
        db 20
        dw 25600d
        db 0ch

        dw 0000h

This is a really cool first answer! Welcome!

You can save 2 bytes by replacing 'mov' with 'xchg' at 10h & 13h and  another 2 bytes by replacing 'test cx,cx/jz' with 'jcxz' at 16h

Some more thoughts. Since the program runs in the infinite loop, you can avoid flickering just by making the loop shorter: _loop: jcxz _loop. You can also cut 2 bytes from the end of the data chunk if you change the loading order of cx and di

Thanks again @meden. The flickering was completely unnecessary in effect :) I also removed the mov bx, 320 and moved the 320 into add di, 320 (previously add di, bx).

Great. Now you've got a firm edge over all machine code answers in this challenge. Just for the sake of correctness: it'd better to move jcxz _cycle right after xchg ax,cx so it wouldn't load bytes past the end of the data. And there's some misleading comments in the source: ;dx = row. dx is not used anywhere in code.

@meden I actually prefer the jcxz where it is, It makes the code a little bit more "uniform" (de gustibus). Reading past the end of the defined data is not a matter in RM, even at the end of the segment. I updated the comment though. Thanks again.

C, 194 191 183 Bytes
#define C "\x1b["
#define A "@@@@@@"
y;f(){for(;y++<14;)printf(y>5&&y<10?y>6&&y<9?C"31m"A A A A"@\n":C"0m"A"@@"C"31m@@"C"0m"A A"@@@\n":C"34m"A"@"C"0m@"C"31m@@"C"0m@"C"34m"A A"@@\n");}

-3 adding one @ on the #define A
-8 adding [ on #define C
Usage
main(){f();}

Output

valid basing on this comment from the OP
Double Size Output, 204 Bytes
#define C "\x1b["
#define B "████"
#define A B B B
y;f(){for(;y++<28;)printf(y>10&&y<19?y>12&&y<17?C"31m"A A A A"██\n":C"0m"A B C"31m"B C"0m"A A B"██\n":C"34m"A"██"C"0m██"C"31m"B C"0m██"C"34m"A A B"\n");}

the 5th upvote triggered a +810 rep network wide... Thanks! (Yes it's the first site where i reach the 200 rep :D)

Doesn't the result have to be "at least 100 x 72 units, where a unit is a pixel or a character"? This doesn't meet this requirement, but I suspect the OP made a mistake when formulating that definition.

@Kritzefitz Well, a character takes up many pixels, so it can be a pixel instead of a character. Found a hole.

@GiacomoGarabello Whats the first site in the at pic where you got +150? I don't recognise the icon.

@LegoStormtroopr It's PPCG!! Take a look at this GitHub Project!

Excel VBA, 254 228 153 bytes
Couldn't really find a way to set column/row size to pixels(thereby making them square) because of the way Excel handles it so make them nice and square first.
Edit 1: Replaced RGB with returned values for colors, -26 bytes
Edit 2: Tried to add as many suggestions as I could, -75 bytes. I was not able to use &48e0 as a color and I am not sure why. Thanks everyone
Sub e()
c "A1:CV72", rgbBlue
c "AC1:AR72", -1
c "A29:CV44", -1
c "AG1:AN72", 255
c "A33:CV40", 255
End Sub

Sub c(d, f)
Range(d).Interior.Color = f
End Sub

Picture:

How did you make the cells square? Did you do it manually, or with some other script not included? I'd like to see it, even if it's not part of your scored program.

I did it manually, the code to change the cell width is easy enough where I could have added it but the sizes aren't consistent between Row/Column or monitor resolutions unless you set the size based on pixels which can't be done from what I could find.  From what I read you have to find the resolution and do some math to convert the pixels to the size the function accepts.

Also the code to convert it to pixels looks like it requires you hard code either some part of the resolution or PPI (I don't really understand the formula) so it seems it wouldn't work across all devices either.

You can save more space with r = &hd72828, w = -1 and using &48e0 for blue. You can also use sub x(r, c), Range(r).Interior.Color = c, end sub and replace those five lengthy lines with something like x "a1:cv72", &48e0 and  x "a33:cv40", r.

I think you can also refer to multi-part ranges which should make it a little smaller, e.g. x "ac1:ar72,a29:cv44", w for both the horizontal and vertical white strips.

And, just for completeness (to do with setting up square cells rather than the solution itself), if you switch to page layout view, you can set cell height and width to specific values like 0.2cm. This will be maintained once you switch back, and no need to try and work out the bizarre Excel aspect ratios :-) By the way, if you want some more cool Excel tricks, look up Joel Spolsky's "You suck at Excel" video.

I think extra whitespace can be removed, even though it is added automatically later.

I was not able to get it to work that way paxdiablo, maybe I don't understand how it's suppose to work?  Also, I was not able to get a multi part range to work.  I actually tried that before I posted the answer but it just selects the entire rectangle instead of the two small areas.

I Count 202. setting w and r is more bytes then its just to use the numbers twice.
Sub b()
Range("A1:CV72").Interior.Color=rgbBlue
Range("AC1:AR72").Interior.Color=-1:Range("A29:CV44").Interior.Color=-1
Range("AG1:AN72").Interior.Color=255:Range("A33:CV40").Interior.Color=255
End Sub

Nice to see someone using VBA; to make cells square within the code use Columns.ColumnWidth = 2.14. This matches the default height of the rows, and so makes all the cells square.

You could probably make the range command set a separate sub and lose quite a few bytes.

Drawing the flag into the top 18x25 cells gives a perfectly respectably sized flag, and loses some extra bytes. Sub e():c "A1:Y18",rgbBlue:c "H1:K18",-1:c "A8:Y11",-1:c "I1:J18",255:c "A9:Y10",255:End Sub and Sub c(d,f):Range(d).Interior.Color=f:End Sub comes in at 138 including 2 line feeds.

I think cells would be considered pixels and fall into the 100 x 72 category.

For future reference a Cells.ColumnWidth=2 call can be used to make all of the cells square; also you can condense c "AG1:AN72", 255 *\n* c "A33:CV40", 255 to c "AG1:AN72,A33:CV40", 255 and like wise for the c call that proceeds it

Also, you were not able to use &48e0 because the hex value that you want it to represent corresponds to t &HE04800 in VBA.

MATL, 57 56 52 49 48 bytes
7:g2IvtPvt!9Mh2$X>2YG[0E28]8*255/7B[43DD]51/v2ZG

This produces the following figure (tested with the compiler running on Matlab and on Octave).

EDIT: You can experimentally try at MATL Online! (you may need to reload the page if it doesn't work initially).
How it works
7:g         % Range from 1 to 7 converted to logical: push array [1 1 1 1 1 1 1]
2           % Push 2
I           % Push 3
v           % Concatenate vertically into a 9×1 array
tPv         % Duplicate, flip vertically, concatenate. Gives a 18×1 array
t!          % Duplicate, transpose: 1×18 array
9M          % Push [1 1 1 1 1 1 1] again
h           % Concatenate horizontally: gives 1×25 array
2$X>        % Maximum of the two arrays, with broadcast. Gives a 18×25 array
            % with 1 for blue, 2 for white, 3 for red
2YG         % Show image with default colormap
[0E28]8*    % Push array [0 72 224] (blue)
255/        % Divide each entry by 255. Colors are normalized between 0 and 1
7B          % 7 converted into binary: push array [1 1 1] (white, normalized)
[43DD]51/   % Push array [215/255 40/255 40/255] (red, normalized)
v           % Concatenate vertically. Gives a 3×3 array
2ZG         % Use as colormap

Bash + Imagemagick 7, 94 90 86 85 bytes
magick -size 84x56 xc:#0048e0 ${s=-splice 8x8}+28+28 -background \#d72828 $s+32+32 x:

Saved 8 bytes, thanks to @manatwork, and 1 byte, thanks to @GlennRanders-Pehrson

If you specify x: instead of output file name, convert will display the result in a window, which is also acceptable. And is enough to just escape the sharp, no need to quote: \#d72828.

Usually we label such answers as Bash + Imagemagick. On  bash side you can save another 4 characters: convert -size 84x56 xc:#0048e0 ${s=-splice 8x8}+28+28 -background \#d72828 $s+32+32 x:.

Just a stupid question: Can you do ${s=-splice 8x8}+56?

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ +56 is treated as +56+0, not +28+28.

You can save another byte by using a recent version of ImageMagick; then the command can be "magick" instead of "convert".

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ, -splice's argument is geometry, superset of X's geometry.

CSS, 285 284 264 bytes
*,:before,:after{background:#fff;width:100;height:72}body{background:#0048e0;margin:0}:before,:after{content:"";position:fixed}:after{background:#d72828}html:before{top:28;height:16}body:before{left:28;width:16}html:after{top:32;height:8}body:after{left:32;width:8

Saved 1 byte thanks to @insertusernamehere.
Saved 20 bytes thanks to @user2428118, by removing all the pxs. Note that this requires the page to be rendered in quirks mode, so it doesn't work in Stack Snippets.
I could copy the Python approach of wrapping an image around at an offset, but it wouldn't be interesting to.
Ungolfed:

*, *::before, *::after {
  background: #fff;
  width: 100px;
  height: 72px;
}

body {
  background: #0048e0;
  margin: 0;
}

*::before, *::after {
  content: "";
  position: fixed;
}

*::after { background: #d72828 }

html::before { top: 28px; height: 16px }
body::before { left: 28px; width: 16px }
html::after { top: 32px; height: 8px }
body::after { left: 32px; width: 8px }

This uses the pseudo-elements (elements that aren't written in HTML) ::before and ::after to create the lines on the flag. The reason it works with no HTML is that in HTML5 the  and  elements are optional, so browsers automatically create them if they're not present.
More fun:

*, *::before, *::after {
  background: white;
  width: 100px;
  height: 72px;
}

body {
  background: #0048e0;
  margin: 0;
}

*::before, *::after {
  content: "";
  position: fixed;
}

*::after { background: #d72828 }

html::before { top: 28px; height: 16px }
body::before { left: 28px; width: 16px }
html::after { top: 32px; height: 8px }
body::after { left: 32px; width: 8px }

@keyframes change-color {
  from { filter: none }
  50% { filter: hue-rotate(360deg) }
  to { filter: none }
}

@keyframes transformations {
  from { transform: translate(150%, 100%) rotateZ(0deg) scale(0.7) }
  15% { transform: translate(150%, 100%) rotateZ(54deg) scale(1.8) }
  to { transform: translate(150%, 100%) rotateZ(360deg) scale(0.7) }
}

html {
  animation:
    0.7s linear infinite change-color,
    1s linear infinite transformations;
}

You can still save 1 byte by replacing white with #fff.

@insertusernamehere Yep, thanks.

If you apply the CSS in quirks mode (page without doctype) you can bring it down to 264 bytes by omitting px everywhere.

@user2428118 Even more useful considering that there's no HTML, therefore no <!doctype html>!

@user2428118 For some reason it doesn't work for me in mobile Safari. I'll have a look when I'm next at a computer.

@gcampbell Stack snippets automatically insert a doctype.

You can replace "::" with just ":" to save 9 bytes

@SolomonUcko I've only used :: in the ungolfed version.

ZX Spectrum BASIC, 210 141 92 bytes
1 LET n=-VAL "8.5": FOR y=n TO -n: FOR x=n TO VAL "16": LET p=VAL "271"(PI-(ABS x<SQR PI OR ABS y>SQR PI)-NOT INT ABS x*INT ABS y): PRINT PAPER p; BRIGHT p>PI;" ";: NEXT x: PRINT : NEXT y

Size determined as the size of the BASIC program on tape via SAVE. A lot of the golfing credit to some members of the ZX Spectrum group on Facebook, in particular @impomatic and Johan Koelman.

Seeing those PAPER and BRIGHT brings so many good memories :-)

Is there any info on how much memory a ZX Spectrum BASIC program takes? I thought it was a "tokenized" language, i.e. I expected FOR, NOT etc to take up only 1 or maybe 2 bytes each

@LuisMendo Yes, it is tokenized - FOR is precisely one byte. However, numbers are "anti-tokenized" in that they are stored as both their text and binary forms and take up 5 more bytes than you'd expect, hence NOT PI instead of zero and the like.

132 bytes by removing the AT and adjusting the boundary test https://twitter.com/john_metcalf/status/752760203007791105

122 bytes with some further optimizations https://twitter.com/john_metcalf/status/752783690179211264

Sorry for the basic question :-P How do I save and load this program into the Fuse emulator?

I love this answer :-)

ZX Spectrum Z80 Assembly, 65 bytes
    ld hl,22528
    ld b,7
    ld de,120*256+8 ; white, blue
    ld a,16         ; red

; create the first row

blueleft:
    ld (hl),e
    inc hl
    djnz blueleft

    ld (hl),d
    inc hl
    ld (hl),a
    inc hl
    ld (hl),a
    inc hl
    ld (hl),d
    inc hl

    ld b,14
blueright:
    ld (hl),e
    inc hl
    djnz blueright

; copy the first row to the next 17 rows

    ld l,b
    ld de,22528+32
    ld bc,17*32
    ldir

; add the horizontal stripe

    ld hl,22528+7*32
    dec d
    ld e,b
    ld c,2
midrep:
    ld b,25
midstripe:
    cp (hl)
    jr z,red
    ld (hl),120
red:
    ld (de),a
    inc hl
    inc de
    djnz midstripe

    ld hl,22528+10*32
    ld e,9*32
    dec c
    jr nz,midrep
    ret

Minecraft 1.10.2, 734 characters
It might be 734 characters, but it's the only submission so far made of actual wool!
summon FallingSand ~ ~1 ~ {Block:log,Time:1,Passengers:[{id:FallingSand,Block:redstone_block,Time:1,Passengers:[{id:FallingSand,Block:activator_rail,Time:1,Passengers:[{id:MinecartCommandBlock,Command:"fill 0 ~ 0 100 ~ 72 wool 11"},{id:MinecartCommandBlock,Command:"fill 28 ~ 0 44 ~ 72 wool"},{id:MinecartCommandBlock,Command:"fill 0 ~ 28 100 ~ 44 wool"},{id:MinecartCommandBlock,Command:"fill 32 ~ 0 40 ~ 72 wool 14"},{id:MinecartCommandBlock,Command:"fill 0 ~ 32 100 ~ 40 wool 14"},{id:MinecartCommandBlock,Command:setblock ~ ~ ~1 command_block 0 replace {Command:fill ~ ~-3 ~-1 ~ ~ ~ air}},{id:MinecartCommandBlock,Command:setblock ~ ~-1 ~1 redstone_block},{id:MinecartCommandBlock,Command:kill @e[type=MinecartCommandBlock]}]}]}]}

Go to about -5x -5z, paste into an Impulse command block, set it to "Always Active" and press Done.
Flag spans from 0, 0 to 100, 72; and is 3 blocks above the command block as placed. It casts a fairly large shadow, and monsters spawn under it. Whether this is accurate to the country of Iceland, however, is anyone's guess.
Fair warning - will /kill all MinecartCommandBlocks in the world in the interest of saving four characters. Don't run this in a world you're overly attached to.

Used MrGarretto's command combiner and tweaked the output a little bit (808 -> 734)

"Whether this is accurate to the country of Iceland..."

Can't you just use kill @e without the target selector argument? It'll kill the player but hey the flag will still be there

Java 8, 449 447 bytes:
import java.awt.*;import javax.swing.*;class A extends JPanel{public void paintComponent(Graphics G){super.paintComponent(G);G.setColor(new Color(0,72,224));G.fillRect(0,0,175,126);G.setColor(Color.WHITE);G.fillRect(49,0,28,126);G.fillRect(0,49,175,28);G.setColor(new Color(215,40,40));G.fillRect(56,0,14,126);G.fillRect(0,56,175,14);}public static void main(String[]a){JFrame J=new JFrame();J.add(new A());J.setSize(175,147);J.setVisible(true);}}

A very late answer, and also the longest one here, apparently. Uses the java.awt.Graphics class to create and open a window with the flag in it, which is created by 5 total rectangles consisting of 1 for the blue blocks, 2 for the white stripes, and 2 for the red stripes. Uses 7 pixels:1 unit ratio. In other words, for each unit, 7 pixels are used. Here is an image of the output on a Macintosh with OS X 10.11:

Now to find a way to golf this down a bit more...

Try overriding paint instead of paintComponent. Consider using an anonymous class for the JPanel. Consider just using a BufferedImage and outputting to a file.

@Justin Actually, I was already using Blue as 1 huge rectangle for the background. I just got mixed up between this and another version I made in Python. Regardless, thanks for the other tips! :)

Some more suggestions: Don't use a JPanel, just override the JFrame. If you do this and just override paint, you don't need Swing, just AWT, so change the JFrame to Frame and remove the import. Don't call super.paint. Rearrange the main method; move the setSize into the paint method of our Frame, remove the variable J, and append .setVisible(true) to the end of the anonymous class. Finally, change .setVisible(true) to be show(), yes it's a deprecated method, but it's shorter. Use an interface to remove the public from the main method.

Final result at 338 chars (had to change the height as well since it's a frame): import java.awt.*;interface A{static void main(String[]a){new Frame(){public void paint(Graphics G){setSize(175,119);G.setColor(new Color(0,72,224));G.fillRect(0,0,175,126);G.setColor(Color.WHITE);G.fillRect(49,0,28,126);G.fillRect(0,49,175,28);G.setColor(new Color(215,40,40));G.fillRect(56,0,14,126);G.fillRect(0,56,175,14);}}.show();}}

Even better: don't paint the first rectangle, just call setBackground(color) (also the size was still wrong). Now at 317: import java.awt.*;interface A{static void main(String[]a){new Frame(){public void paint(Graphics G){setSize(175,126);setBackground(new Color(0,72,224));G.setColor(Color.WHITE);G.fillRect(49,0,28,126);G.fillRect(0,49,175,28);G.setColor(new Color(215,40,40));G.fillRect(56,0,14,126);G.fillRect(0,56,175,14);}}.show();}}

I'm a C# guy, not Java, but they're prettying similar. Does Java require access modifiers, or could you declare things as void instead of public void?

Much better than my attempt with JavaFX.

@ArtOfCode In this case, it has to be public void since it overrides a public method. But otherwise, Java would be fine with it.

As it turns out, you don't need a complete program; the question says a function suffices. In that case, we can shorten it even more by removing the class (down to 285), posted on ideone to avoid the zero-width-space problem: http://ideone.com/2SpE18

Logo, 216 188 bytes
Using Calormen.com's implementation.  For you purists, the implementation uses some antialiasing which feathers the edges a little.  I did waste 3 bytes hiding the turtle, though, so that should make up for it.
This could be reduced greatly if your Logo implementation lets you set the size of the window.  Then you could wrap and make the turtle plow on through to make the cross in four strokes, and skip having to trim it up with a border.

TO X :C :S
setpc :C
setpensize :S
home
pd
setx 100
setx 36
bk 36
fd 72
pu
END
setpc "#48e0
fill
X 7 16
X "#d72828 8
fd 4
pe
pd
setx -4
bk 80
setx 104
fd 80
setx 0
ht

I didn't know there was an English speaking version of Logo!

Absolutely.  I think I first saw it over 30 years ago on an Apple IIe.  I also had it on my TRS-80 Color Computer.  It was my first taste of using angles in geometry, years before I was to officially learn it in school.

Why the white border around it?

I drew the lines using a large pen, which leaves rounded edges on the tips of the cross, so I had to sweep around it with a large eraser to square them up.  I was writing another version of this which used a completely different method in Logo and turned out to be smaller.  I also was working on a third version that prints a big Unicode Latin cross and paints it, but the proportions weren't right and the size looked like it would exceed this one.

R, 197 195 187 bytes
w="white";r="#d72828";png(w=100,h=72);par(mar=rep(0,4),bg="#0048e0",xaxs="i",yaxs="i");frame();rect(c(0,7,0,8)/25,c(7,0,8,0)/18,c(1,.44,1,.4),c(11/18,1,5/9,1),c=c(w,w,r,r),b=NA);dev.off()

Indented, with new lines and explanations:
w="white"
r="#d72828"
png(w=100,h=72) #Creates in working directory a png called Rplot001.png
                #with a width and a height of 120 and 72 pixels respectively.
par(mar=rep(0,4), #No margin around the plot
    bg="#0048e0", #Blue background
    xaxs="i",yaxs="i") #Axes fits range exactly
frame() #Creates an empty plot which range is xlim=c(0,1) & ylim=c(0,1)
rect(c(0,7,0,8)/25, #Because rect is vectorized
     c(7,0,8,0)/18,
     c(1,.44,1,.4), #i. e. c(25,11,25,10)/25
     c(11/18,1,5/9,1), #i. e. c(11,18,10,18)/18
     c=c(w,w,r,r), # c= is the same as col=, thanks to argument name completion
     b=NA)#No borders
dev.off()

Edit: turns out frame(), contrary to plot() or plot.new() doesn't by default add a border to the plot, meaning bty="n" was unnecessary here.

FFmpeg, 339 184 bytes
ffplay -f lavfi color=d72828:100x36[r];color=white:64x32[w];color=0048e0:56x28[b];[w][b]overlay=4,split[x][y];[r][x]overlay=-32[d];[d][y]overlay=40,split[t][m];[m]vflip[n];[t][n]vstack

Will try to golf this down ..further.

Python, 119 118 114 112 bytes
Nothing special, straightforward:
b,w,r="\0H\xe0"*28,"\xff"*12,"\xd7(("*8
A,B=28*(b+w+r+w+2*b),4*(8*w+r+15*w)
print"P6 100 72 255 "+A+B+100*r+B+A

Output as binary PPM, usage
python golf_iceland.py > iceland.ppm

Edit1: shoved a byte between print and the quotation mark
Edit2: slighty shorter as binary PPM
Edit3: Figured that \0 can be used instead of \x00

If someone knows how to use the non-printable ASCII-character directly, please let know.

Congratulations! You beat me by a lot :D

@GáborFekete beat you in bytes, yes. But your answer is much more clever with that offset

Why not have the results of the escapes instead of the escapes themselves?

@SolomonUcko I tried b,w,r="\0Hà"*28,"ÿ"*12,"×(("*8 and using Python 3, but it does not work.

@KarlNapf, how did it fail? Did it draw incorrectly, or give an error message? It could also be an encoding issue.

@SolomonUcko Output failed, was colored gibberish, so yes it is somehow an encoding issue.

Atari 8-bit executable, 123 bytes
Another "just for fun" entry, this program is meant to be run on an Atari 8-bit computer or emulator. For example, to load the program on Atari800, just run:
atari800 iceland.xex

Machine code (in hex bytes)
ff ff 00 06 74 06 a9 1b 8d 30 02 a9 06 8d 31 02
a9 44 8d c4 02 a9 0f 8d c5 02 a9 84 8d c6 02 d0
fe 70 70 70 48 57 06 48 57 06 48 57 06 48 57 06
48 57 06 48 57 06 48 57 06 48 61 06 48 6b 06 48
6b 06 48 61 06 48 57 06 48 57 06 48 57 06 48 57
06 48 57 06 48 57 06 48 57 06 41 1b 06 ff fe 5b
ff ff ff c0 00 00 00 aa aa 5a aa aa aa 80 00 00
00 55 55 55 55 55 55 40 00 00 00

Assembler source code (can be compiled with MADS):
        org $0600
        lda <dlist
        sta $0230
        lda >dlist
        sta $0231
        lda #$44
        sta $02c4
        lda #$0f
        sta $02c5
        lda #$84
        sta $02c6
loop    bne loop
dlist   dta $70, $70, $70
        dta $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1)
        dta $48, a(line2)
        dta $48, a(line3), $48, a(line3)
        dta $48, a(line2)
        dta $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1), $48, a(line1)
        dta $41, a(dlist)
line1   dta $ff, $fe, $5b, $ff, $ff, $ff, $c0, $00, $00, $00
line2   dta $aa, $aa, $5a, $aa, $aa, $aa, $80, $00, $00, $00
line3   dta $55, $55, $55, $55, $55, $55, $40, $00, $00, $00

How it works:
The program uses a custom display list that's based on ANTIC Mode 8 (40 pixels per line, 2 bpp). Repeated lines are loaded from the same memory location. After setting up the display, the program enters an infinite loop.
Screenshot:

Java, 335 bytes
The function is
void w()throws Exception{int w=100,h=72;BufferedImage i=new BufferedImage(w,h,1);Graphics g=i.getGraphics();g.setColor(new Color(18656));g.fillRect(0,0,w,h);g.setColor(WHITE);g.fillRect(0,28,w,16);g.fillRect(28,0,16,h);g.setColor(new Color(14100520));g.fillRect(0,32,w,8);g.fillRect(32,0,8,h);ImageIO.write(i,"png",new File("f.png"));}

And it writes the desired image as f.png, with a size of 100x72
(Note that this is not a direct competitor to the Answer by R. Kap, because it writes a file, and does not display the image on the screen)
Here is the ungolfed version that can be compiled and run:
import static java.awt.Color.WHITE;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.File;

import javax.imageio.ImageIO;

public class Iceland
{
    public static void main(String[] args) throws Exception
    {
        Iceland i = new Iceland();
        i.w();
    }

    void w() throws Exception
    {
        int B=0x0048e0,R=0xd72828,w=100,h=72;
        BufferedImage i=new BufferedImage(w,h,1);
        Graphics g=i.getGraphics();
        g.setColor(new Color(B));
        g.fillRect(0,0,w,h);
        g.setColor(WHITE);
        g.fillRect(0,28,w,16);
        g.fillRect(28,0,16,h);
        g.setColor(new Color(R));
        g.fillRect(0,32,w,8);
        g.fillRect(32,0,8,h);
        ImageIO.write(i,"png",new File("f.png"));
    }
}

A side note, regarding the related questions: Maybe one should create a challenge to paint the flags of

Indonesia
Poland
Finland
France
Netherlands
Thailand
Norway

at the same time:

JavaScript + HTML, 267 bytes

document.write("
`linear-gradient(to ${d+(t=",transparent ")+a}%,#${c} ${a}%,#${c} ${o}%${t+o}%)`)+",#003897'")

Sure the 7 - 14 ratio of left and right blue widths is correct?

@manatwork Oops, for some reason I thought 100 / 25 = 5, so everything ended up 25% too wide.

Python IDLE, 191 172 156 bytes
IDLE is Python's standard IDE. Unless it has a custom theme, STDOUT is blue, STDERR is red, and the background is white. So, the following code:
from sys import*
x=[1]*7;y=[0]*7;z=[0,2,2,0]
f=[x+z+x*2]*4+[y+z+y*2,[2]*25]
for s in f+f[::-1]:[[stderr,stdout][-x].write(' █'[x>0]*2)for x in s];print()

Produces this output:

As printed characters as not square, this is slightly off, but if we take 1 unit to be 2 chars across and 1 char tall, then the proportions are exact.
This could be golfed, by halfing the width dimension, and using an ASCII character for the blocks such as '#', but it doesn't exactly have the same effect.

Explanation
The code itself seems quite sloppy at the moment, and can definitely be golfed, but the basic idea is:

Construct a matrix where 0 represents whitespace, 1 represents a blue block, and 2 represents a red block.

The first half is constructed (mainly through list slicing / multiplication), and added to the reverse of itself to generate the full flag.

Loop through the matrix, printing each value as either whitespace or a block to STDERR/STDOUT accordingly. Print a newline after each row.

Processing, 136 bytes
size(100,72);noStroke();background(#0048e0);fill(255);rect(28,0,16,72);rect(0,28,100,16);fill(#d72828);rect(0,32,100,8);rect(32,0,8,72);

Ungolfed
//open the window
size(100,72);
//turn off borders that surround shapes by default
noStroke();
//draw blue as the background
background(#0048e0);
//set color to white
fill(255);
//draw 2 white bars
rect(28,0,16,72);
rect(0,28,100,16);
//set color to red
fill(#d72828);
//draw 2 red bars
rect(0,32,100,8);
rect(32,0,8,72);

Output:

You can shave off two more bytes by using fill and rect instead of size and background. 134 bytes:
noStroke();fill(#0048e0);rect(0,0,100,72);fill(255);rect(0,28,100,16);rect(28,0,16,72);fill(#d72828);rect(0,32,100,8);rect(32,0,8,72);

Adding on to what GuitarPicker said, fill(-1) is one byte shorter than fill(255)

Mathematica 174 157 bytes
Without builtins:
157 bytes
r=Rectangle;c=RGBColor;Graphics@{c[{0,72,224}/255],r[{0,0},{25,18}],White,r[{7,0},{11,18}],r[{0,7},{25,11}],c[{43,8,8}/51],r[{8,0},{10,18}],r[{0,8},{25,10}]}

or alternatively
232 bytes
x=Join[Unitize/@Range@7,{0},{2,2},{0},Unitize/@Range@14]&/@Range@7;y=Join[ConstantArray[0,8],{2,2},ConstantArray[0,15]];z=ConstantArray[2,25];ArrayPlot[Join[x,{y},{z,z},{y},x]/.{2->RGBColor[{43,8,8}/51],1->RGBColor[{0,72,224}/255]}]

you're welcome. same can be applied to your second longer version. u=Unitize;c=ConstantArray etc ^_^

Wait, there's something Mathematica doesn't have a builtin for? I'm surprised.

@MorganThrapp I'm sure there used to be another Mathematica answer using a builtin.

There is CountryData["Iceland", "Flag"]

J, 86 84 83 bytes
   load'viewmat'
   (255,0 72 224,:215,2#40)viewmat _9 _9|.2(b=.[,~[,.~[,[,.])0 b 14 21$1

The approach is the same as @Gábor Fekete's with Python.
Left argument colors for viewmat is an array of RGB values, in our case:
255 255 255
  0  72 224
215  40  40

And the right argument is a matrix of indices of colors.
(_9 _9 |. matrix) instructs to shift matrix 9 items in each dimension.
Scary construction (border ([,~[,.~[,[,.]) matrix) wraps matrix with number border.
And (14 21 $ 1) makes 14×21 matrix of ones.
The output is displayed in separate resizable window, pretty large by default.

Thanks
miles - saved 2 bytes with reordering the colors, used the feature of , that duplicates the numbers (255) for the shape agreement.

It looks like the height of the flag is 26 units instead of 25.

@GáborFekete hm, you meant height is 19 instead of 18? didn't mention that, just noticed after your comment

Oh right I wrote height but used the width values...

yeeeah, indeed. i made a mistake in values. the shape of initial matrix should be 14 21 (18 25 - 4 4). correcting... thank you!

You can save 2 bytes reordering the rgb values (255,0 72 224,:215 40 40)viewmat _9 _9|.2(b=.[,~[,.~[,[,.])0 b 14 21$1

JavaScript (ES6), 231 240
Code inside the snippet below. Run it to test.

d=(w,h,c)=>`<div style=float:left;width:${w}em;height:${h}em;background:#${['0048e0','fff','d72828'][~~c]}>`;document.write(d(25)+(a=[252,61,94,61,476]).concat(b=[261,70,485],810,b,a).map(v=>d(v>>5,v/4&7,v&3)).join(e='
')+e+e)

SVG+Javascript, 190 165 164 bytes
No expert there, repeating one path just to change the color and line width looks silly javascript ftw!

document.write(`<svg><rect width=100 height=72 fill="#0048e0"/>${a='<path d="M0 36L100 36M36 0L36 72"style="stroke-width:'}16;stroke:#fff"/>${a}8;stroke:#d72828">`)

More readable:
document.write(`<svg><rect width=100 height=72 fill="#0048e0"/>
${a='<path d="M0 36L100 36M36 0L36 72"style="stroke-width:'}16;stroke:#fff"/>
${a}8;stroke:#d72828">`)

You can use path d="m0,0h100v72H0" instead of the rectangle to save two bytes. Likewise, use M0 36H100M36 0V72 for the other path's data, which saves another five bytes. And you can drop the style attribute in favour of declaring both stroke-width and stroke as attributes to save another five bytes.

ZX Spectrum Z80 Assembly, 51 bytes
https://github.com/ralphbecket/Z80/blob/master/IcelandFlag/IcelandFlag.asm
                zeusemulate "48K", "ULA+"
ZeusEmulate_PC  equ Main
ZeusEmulate_SP  equ $FF40

                org $8000

MinWhite        equ 7
MinRed          equ MinWhite + 1
TopRed          equ MinRed + 2
TopWhite        equ TopRed + 1
Height          equ TopWhite + MinWhite - 2
Width           equ TopWhite + 2 * MinWhite - 1

White           equ %01111000
Red             equ %01010000
Blue            equ %01001000

Main            ld hl, $5800 + ((Height - 1) * 32) + (Width - 1)
                ld c, Height

YLoop           ld b, Width

XLoop           ld (hl), Red
                ld de, MinRed * $100 + TopRed
                call Test
                jr c, Next

                ld (hl), White
                ld de, MinWhite * $100 + TopWhite
                call Test
                jr c, Next

                ld (hl), Blue

Next            dec hl
                djnz XLoop
                ld de, -(32 - Width)
                add hl, de
                dec c
                jr nz, YLoop
                ret

Test            equ *
TestX           ld a, b
                cp d
                jr c, TestY
                cp e
                ret c
TestY           ld a, c
                cp d
                ccf
                ret nc
                cp e
                ret

Python Turtle, 176 bytes
Another Python Turtle implementation but this time based on stamping instead of drawing:
from turtle import*
shape("square")
c=color
c("navy")
z=shapesize
z(18,25)
s=stamp
s()
c("white")
z(4,25)
s()
bk(70)
seth(90)
s()
c("#d72828")
z(2,18)
s()
home()
z(2,25)
done()

Using stamping, and not making it easily scalable, saves about 60 bytes of code.

The fun part is you can replace the "square" polygon option with the "turtle" polygon option in the shape() call and get an ecogroovy logo:

PICO-8/Lua, 108 100 92 bytes (non-competing)
rectfill(0,0,24,17,12)
rect(0,7,24,10,7)
rect(7,0,10,17,7)
rect(0,8,24,9,8)
rect(8,0,9,17,8)

Why is this marked "Non-competing"? Usually, that is reserved for using a language that's newer than the challenge.

Because the blue is brighter than the flag's blue.

I don't know much about Pico8/lua, but is it possible to make the colors match? Otherwise, this answer is incorrect, which means it should be deleted.

@daHugLenny Since the contest allows for ANSI colors if necessary, I'm sure this would be fine.

@DrGreenEggsandIronMan Nope, the PICO-8 has a fixed 16-color palette. :< The only two shades of blue in the palette are too dark and too bright, respectively.

@MCMastery In that case it isn't "non-competing". This is either a valid competing answer, or its not and is subject to deletion -- there's no middle state.

Perl 5 + -p0513, 100 bytes
$b="..."x28;$}=1x12;$@="..."x8;print"P6 100 72 31",$_="$b$}$@$}$b$b"x28,$\=($}x8 .$@.$}x15)x4,$@x100
Try it online!
Outputs a PBM image.

Perl 5 + -M5.10.0 -p0513, 107 bytes
($},$@,$;)=map".[48;5;${_}m ",18,15,1;$}x=7;say$\="$}$@$; $@$}$}
"x7,$_=$@x8 .$;.$;.$@x15 ."
",$;x=25,"
",$
Try it online!

Uses ANSI escape sequences and assumes a Linux terminal to display the flag. Looks a bit weird using the measurements provided.
Perl 5 + -M5.10.0 -p0513, 109 bytes
This version looks a bit closer to the expected dimensions...
($},$@,$;)=map".[48;5;${_}m  ",18,15,1;$}x=7;say$\="$}$@$;$;$@$}$}
"x7,$_=$@x8 .$;.$;.$@x15 ."
",$;x=25,"
",$
Try it online!

Perl 5 + -M5.10.0 -p0513, 103 bytes
Using the standard ANSI colours (as specified in the question) saves another 4 bytes!
($},$@,$;)=map".[${_}m ",44,47,41;$}x=7;say$\="$}$@$; $@$}$}
"x7,$_=$@x8 .$;.$;.$@x15 ."
",$;x=25,"
",$
Try it online!

The weirdness comes from the fact that characters are taller than their width.

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ Indeed, I did wonder if there were square fixed-width fonts, but I don't imagine they'd look particularly good! I might update that second version to look even closer (it shouldn't take any more bytes than it currently is, but time...)

On a TTY, you cannot wonder such a thing, the font is THE FONT! You can't change it just because you don't like it.

C#, 384 346 317 292 291 289 Bytes
Simple solution with Windows Forms and GDI
Func<int,int,Point>p=(x,y)=>new Point(x*10,y*10);var b=new Bitmap(250,180);var g=Graphics.FromImage(b);g.Clear(Color.Blue);g.DrawLines(new Pen(Color.White,40),new[]{p(0,9),p(50,9),p(9,-20),p(9,18)});g.DrawLines(new Pen(Color.Red,20),new[]{p(0,9),p(50,9),p(9,-20),p(9,18)});b.Save("b.png");

Usage
Start a new console-project and put the code above in the main-method, add System.Drawing-Namespace.
How it works
The code creates a new image and draws some lines on it. It saves the image to disk. Some of the ending points of the lines are outside the visible area.

Welcome to PPCG ! Great first codegolf, but it looks like you could improve it. First, I think you can removes some spaces here and there (b = new=>b=new, using () => using(), don't use spaces after ;s. If you want, you can read our Tips for golfing in C# to find some advices.

Thanks, spaces are removed and I delete the using statement, too. I also use anonymous variables now.

Sure you need Process.Start(f);? As I understand, that is similar to cmd start. As you can choose to save or display the image and you already saved it, that step seems pointless. In which case maybe you can avoid declaring variable f too.

Yes! Just save now and no opening more ...

You should count the bytes for the namespace usings as well as for a method declaration or program boilerplate. This is all part of what's needed (the task gives you the choice of a function or a program, but not the choice of just a bunch of statements).

SpecaBAS - 150 bytes
1 a=15,b=250,c=180: FOR i=1 TO 5: READ k,x,y,w,h: RECTANGLE INK k;x,y,w,h FILL: NEXT i
2 DATA 1,0,0,b,c,a,71,0,40,c,a,0,71,b,40,2,81,0,20,c,2,0,81,b,20

Reads the ink colour, x,y, width and height and draws a rectangle with those coordinates/dimensions.

Do you need spaces after each :? Oh, and it's 151 bytes.

TI-BASIC (non-competing), 323 bytes
Code is written for the TI-84, 83, and variants. I sure hope it isn't an issue that dimensions vary by device, and that the code isn't colored.
Setup:
:18→Xmax:¯18→Xmin
:10→Ymin:¯10→Ymin
:AxesOff

Drawing:
:Line(¯15,9,¯8,9)
:Line(¯8,9,¯8,2)
:Line(¯8,2,¯15,2)
:Line(¯15,2,¯15,9)

:Line(¯15,¯9,¯8,¯9)
:Line(¯8,¯9,¯8,¯2)
:Line(¯8,¯2,¯15,¯2)
:Line(¯15,¯2,¯15,¯9)

:Line(¯4,9,10,9)
:Line(¯4,2,10,2)
:Line(¯4,9,¯4,2)
:Line(10,9,19,2)

:Line(¯4,¯9,10,¯9)
:Line(¯4,¯2,10,¯2)
:Line(¯4,¯9,¯4,¯2)
:Line(10,¯9,19,¯2)

:Line(¯15,1,¯7,1)
:Line(¯15,¯1,¯7,¯1)
:Line(¯5,1,20,1)
:Line(¯5,¯1,¯20,¯1)
:Line(¯7,¯1,¯7,¯9)
:Line(¯5,¯1,¯5,¯9)
:Line(¯7,1,¯7,9)
:Line(¯5,1,¯5,9)

Golfed:
:18→Xmax:¯18→Xmin:10→Ymin:¯10→Ymin:AxesOff:Line(¯15,9,¯8,9:Line(¯8,9,¯8,2:Line(¯8,2,¯15,2:Line(¯15,2,¯15,9:Line(¯15,¯9,¯8,¯9:Line(¯8,¯9,¯8,¯2:Line(¯8,¯2,¯15,¯2:Line(¯15,¯2,¯15,¯9:Line(¯4,9,10,9:Line(¯4,2,10,2:Line(¯4,9,¯4,2:Line(10,9,19,2:Line(¯4,¯9,10,¯9:Line(¯4,¯2,10,¯2:Line(¯4,¯9,¯4,¯2:Line(10,¯9,19,¯2:Line(¯15,1,¯7,1:Line(¯15,¯1,¯7,¯1:Line(¯5,1,20,1:Line(¯5,¯1,¯20,¯1:Line(¯7,¯1,¯7,¯9:Line(¯5,¯1,¯5,¯9:Line(¯7,1,¯7,9:Line(¯5,1,¯5,9

Yes, the lack of ) is intentional.
Size:
Line( and all commands like that take up 1 byte, each number takes a byte. That's 323 bytes.
That was absolutely tedious. I'll get this on an emulator hopefully (I have to manually enter everything) but it's literally just lines in the shape of the flag.

Do commands like this really only take one byte? What is the value of the byte?

@Random832 Oddly enough, yes! Check the token size here: http://tibasicdev.wikidot.com/line I'm not sure what the byte is exactly. However I do know that on the calculator, it is treated essentially as a char.

@Random832 The byte for Line( is 0x9C. You can see a table of one-byte tokens here: http://tibasicdev.wikidot.com/one-byte-tokens

Couldn't you graph using regions (using < and >) instead of lines to get greyscale shading?

Why is this non-competing?

Note that there is now a color TI-84, so you could probably run it on there with only minor modifications.

@Mego Doesn't fit the requirements for colors exactly.

@MosheKatz I am aware (and quite jealous of anyone with a TI-84C). However I have no idea how exactly to do that as I've never gotten my hands on one. Might try an emulator later if I can get it to run at an acceptable speed on my computer.

@charredgrass If it doesn't use the exact colors, non-competing has nothing to do with it. Relevant meta post. You should ask the OP for clarification, though, since the only current allowance is using the ANSI values for red, white, and blue, rather than the exact values.

I would try to make it competing if you can. I mean, it's not like you're trying to subvert the rules to save on bytes, you're using what is available to you.

Excel VBA, 126 112 111 Bytes
This is an immediates window function that outputs to the Application.ThisWorkbook.Activesheet object
Golfed:
Cells.RowHeight=48:[A1:G7,A12:G18,L1:Y7,L12:Y18].Interior.Color=-2078720:[A9:Y10,I1:J18].Interior.Color=2631895

Ungolfed:
Sub MakeIcelandicFlag()
    Let Cells.RowHeight = 48
    Let Range("A1:G7,A12:G18,L1:Y7,L12:Y18").Interior.Color = -2078720
    Let Range("A9:Y10,I1:J18").Interior.Color = 2631895
End Sub

-14 Bytes by converting Range(/*Address*/) calls to [/*Address*/]calls
-1 Byte for converting Cells.ColumnWidth=2to Cells.RowHeight=48
Output:

I think the red strips have to be 2 cells wide - see 5th bullet in question

@Mistah Figgins it has been corrected, Thanks for the catch!

PowerShell v2+, 379 340 289 286 bytes
nal n New-Object
Add-Type -A *.Dr*g,S*ms
$x='$g.FillRectangle((n Drawing.SolidBrush '
($f=n Windows.Forms.Form).Add_paint({$g=$args[1].Graphics;"$x'#0048e0'),0,0,100,72);$x white),28,0,16,72);$x white),0,28,100,16);$x'#d72828'),32,0,8,72);$x'#d72828'),0,32,100,8)"|iex})
$f.ShowDialog()

Linebreaks and semicolons count the same, so linebreaks left in for clarity. ;-)
So, drawing in PowerShell is not its strong suit -- it needs to use lengthy .NET assembly imports and GDI+ function calls.
Saved 39 bytes saved thanks to TessellatingHeckler's answer, and another 51 bytes thanks to Joey's impressive golfing commentary. Thanks to them both!
We start with creating a New-Alias n and assign it New-Object. We can thus reference just n instead of New-Object elsewhere in the program. Next is the import calls, with wildcards -- we're importing System.Drawing and System.Windows.Forms. We then create a variable $x that we use for several repeated calls in the future, so we're not needing to type it out every time.
The next line is the meat-and-potatoes of the program. We start with setting $f as a new Windows.Forms.Form and immediately call the Add_paint() routine on it.
Inside the paint routine, the first line is to create our graphics component, $g, that we'll use as our canvas. The next line is actually a constructed string that we pass to iex (similar to eval) so that we can leverage the $x variable from above. We're simply drawing the blue background, then two white rectangles, followed by two red rectangles. We adjust the values appropriately each time and pipe it to the Invoke-Expression.
The final line simply shows the dialog form as we've drawn it above.

Note that since we're creating a form object, and PowerShell is all about the pipeline, closing the pop-up form will pass along a System.Enum.DialogResult object of Cancel, since that's technically what the user did. Since we're not capturing or otherwise doing anything with that result, the word Cancel will be displayed to STDOUT when the program concludes, as it was left on the pipeline. That can be suppressed by adding >$a to the end of the last line, if so required, so the output redirects into a throwaway variable.

If you pinch the start of my script here: http://codegolf.stackexchange.com/a/59110/571 - you can drop to a single Add-Type call, and reuse the same string for adding the System.Windows.Forms type and creating the object.

@TessellatingHeckler Oh, that's excellent. I tweaked it around a little bit more and squeezed a few additional bytes out. Additionally, dropped the height/width setting of the form - the default (at least v4 on Win8.1) seems fine.

@Joey Wow, thanks for the massive golf. I left the nal in so it's for v2+, so it's at 289 now.

@Joey True, but if I surround it in quotes or prepend two grave accents, it's still two bytes each. Saved the quotes for white, though.

@AdmBorkBork the Add-Type can be shortened to Add-Type -A S*ms

@root Are you sure? I get an error that Drawing isn't recognized when I try that on my machine.

@AdmBorkBork Working for me, version 5.1.15063.483

GLSL, 266 265 bytes (non-competing)
Just for fun!
Only input it takes is the uniform which is the resolution of the texture it draws to. Needs an existing OpenGL context.
The function r masks a rectangular area. The colors and the proportions are a bit off but looks believable.
#define r(p,w,h)step(abs(p.x),w)*step(abs(p.y),h)
uniform vec2 R;void main(){vec2 p=-1.+2.*gl_FragCoord.xy/R;p.y*=R.y/R.x*1.39;vec2 q=p;p.x+=.3;p=mod(p,2.)-1.;gl_FragColor.rgb=mix(mix(vec3(.83,.15,.15),vec3(1.),r(p,.9,.85)),vec3(0.,.28,.95),r(p,.8,.7))*r(q,1.,1.);}

Can you do #define r(p,w,h)step(abs(p.x),w)*step(abs(p.y),h)?

Yes that works! Thank you!

https://codegolf.stackexchange.com/a/85518/6485 — you might want to look at this answer (it's also in GLSL but even smaller)

Thanks, I could help to save some bytes on that code. My solution works in a general GLSL context, his on shadertoy which has uniforms defined and has a change in the main function to work with arguments.

Vim, 49 keystrokes
25i<Ctrl+k>:S<Esc>yy17pqal<Ctrl+v>G$khhqr<Space>j@akhr<Ctrl+k>?SGV8kdggP<Ctrl+v>G15ld$p

I'm certain it could be golfed more, but there you have it. I spent some extra keystrokes on the :S (MEDIUM SHADE) and ?S (DARK SHADE) digraphs for a result I'm pretty happy with:

Explanation:
25i<Ctrl+k>:S<Esc>yy17p  " Draw 18 lines of "blue" blocks
qa                       " Start recording macro "a"
  l<Ctrl+v>G$khh           " Visual-block select the inner rectangle
q                        " Stop recording
r<Space>                 " Replace rectangle with spaces
j@akh                    " Select next inner rectangle
r<Ctrl+k>?S              " Replace rectangle with "red" blocks
GV8kdggP                 " Cut the last 9 lines and paste them before the first line
<Ctrl+v>G15ld$p          " Cut the first 16 columns and paste them after the last column

If I have some time later I'll try to record a GIF of it in action.

I love seeing vim answers since there is a good chance you'll discover something new in the huge feature set of vim. This time for me: digraphs. Not as big a revelation as discovering o in visual mode, but still a useful thing to know.

NES 6502 Assembly, 156 Bytes
This might not be the most impressive implementation, but it felt like between all the other popular assembly languages this one was still missing.
I don't even know if this is a valid answer, as it requires CHR ram to be enabled and the reset vector to point to $8000, something that cannot be done through code (as far as I know). At least it fills the entire screen.
.org $8000
waitvblank:
LDA $2002           AD0220
BPL waitvblank      10FB
ldx #$ff            A2FF
txs                 9A
ldx #$00            A200
lda #$07            A907
sta $00             8500
lda #$20            A920
sta $01             8501
ldy #$0c            A00C
lda #$02            A902
loop_a_a:
pha                 48
dey                 88
bne loop_a_a        D0FC
txa                 8A
pha                 48
lda #$01            A901
pha                 48
pha                 48
pha                 48
pha                 48
txa                 8A
pha                 48
ldy #$0c            A00C
lda #$02            A902
loop_a_b:
pha                 48
dey                 88
bne loop_a_b        D0FC
lda #$3f            A93F
sta $2006           8D0620
txa                 8A
sta $2006           8D0620
sta $2001           8D0120
lda #$12            A912
sta ($00,x)         8100
lda #$16            A916
sta ($00,x)         8100
lda #$30            A930
sta ($00,x)         8100
txa                 8A
sta $2006           8D0620
sta $2006           8D0620
ldy #$08            A008
jsr dmaloop         200081
lda #$ff            A9FF
ldy #$10            A010
jsr dmaloop         200081
txa                 8A
ldy #$18            A018
jsr dmaloop         200081
lda #$20            A920
sta $2006           8D0620
txa                 8A
sta $2006           8D0620
loop_b:
ldx #$00            A200
ldy #$09            A009
pla                 68
jsr dmaloop         200081
pha                 48
and #$01            2901
pha                 48
sta ($00,x)         8100
lda #$01            A901
sta ($00,x)         8100
sta ($00,x)         8100
sta ($00,x)         8100
pla                 68
sta ($00,x)         8100
ldy #$12            A012
pla                 68
jsr dmaloop         200081
tsx                 BA
inx                 E8
bne loop_b          D0DD
txa                 8A
ldy #$40            A040
jsr dmaloop         200081
lda #$0a            A90A
sta $2001           8D0120
loop_so_i_dont_break_anything:
bne loop_so_i_dont_break_anything   D0FE
.org $8100
dmaloop:
sta ($00,x)         8100
dey                 88
bne dmaloop         D0FB
rts                 60

Welcome to Code Golf, and nice answer!

HTML+CSS, 276 258 254 234 bytes
Ridiculously quite long compared to the SVG+JS solution.

*{position:fixed;background:#fff}e,f{background:#d72828}a{background:#0048e0}c{top:36px;height:16px}d{left:36px;width:16px}e{top:40px;height:8px}f{left:40px;width:8px;}d,f,a{height:72px;top:8px}a,c,e{left:8px;width:100px
<c><d><e><f

*{position:fixed} should do it. And it's 18 bytes shorter than a,a *{display:block;position:fixed}.

@insert Indeed, thanks for that. The other way I was working with failed though.

This should save you another 12 bytes: *{position:fixed;background:#fff}e,f{background:#d72828}a{background:#0048e0}c{top:36px;height:16px}d{left:36px;width:16px}e{top:40px;height:8px}f{left:40px;width:8px}d,f{top:8px}c,e{left:8px}a,c,e{width:100px}d,f,a{height:72px, fiddle.

@insert Thanks again, saved 20 with your hints :)

@insertusernamehere: looks fine here, but when copied to a regular document (in every Browser I have installed on all my machines: Windows 10, Ubuntu, Android, iPhone), fis not displayed.

@insertusernamehere You need the > in most cases! The real test (opening it with a browser) won't work there. Also, sometimes you even need <c/><d/><e/><f/> or, even worse, <c></c><d></d><e></e><f></f>!

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ @Titus - You're both correct. I somehow thought, that the browser will wrap it in a -element implicitly. But this is not the case. Removed the suggestion.

@insertusernamehere  and  elements are in fact implicit, but <a_half_of_a_tag_without_a_greater_than_symbol_at_the_end is considered pure text.

@EʀɪᴋᴛʜᴇGᴏʟғᴇʀ Ah OK, got it. The browser corrects the "mistake" if any other tag follows explicitly. If not, it wraps everything in and drops the incorrect tag – at least the inspector in Safari and Chrome won't show <f anymore.

bash, 239 161 bytes
took the closest colors I could find in ANSI
golfed by a third (an amazing 78 bytes) with manatwork´s tips
a="${u=${e=\e[48;5};20m}${s=       }${w=$e;231m} ${r=$e;124m}  $w $u$s$s${n=\e[0m
}"
printf "${t=$a$a$a$a$a$a$a}${b=$w$s $r  $w $s$s$n}${c=$r$s    $s$s$n}$c$b$t"

ungolfed (184 bytes + comments)
u='\e[48;5;20m'             # color blUe
r='\e[48;5;124m'            # color Red
w='\e[48;5;231m'            # color White
#presets:
n="\e[0m\n"                 # No color + New line
s='       '                 # 7*chr(32)

# lines:
a="$u$s$w $r  $w $u$s$s$n"  # blue-white-red-white-blue
b="$w$s $r  $w $s$s$n"      # white-red-white
c="$r$s    $s$s$n"          # all red

# output:
t="$a$a$a$a$a$a$a"          # 7* line $a
printf "$t$b$c$c$b$t"

output pretty distorted due to character aspect ratio:

You could pack it to 159 characters without changing the base principle: http://pastebin.com/8YKAR7Mn (^[ is a literal escape character counted as 1). Regarding those function declarations, see Dennis's related tip in Tips for golfing in Bash.

@manatwork: A) Wow didn´t know about the variable definition in strings. B) ^[ doesn´t seem to work - what bash version is that? C) Same for the function definitions: a(){for i ...} => unexpected "{for" (a()(...) works)

A) See ${parameter:=word} in man bash. B) ^[ is the graphic image of the escape character. In command line and Vim you enter it with Ctrl+v, Esc, in MCEdit and Emacs with Ctrl+Q, Esc. (In MCEdit you may need a second Esc too, depending on configuration.) C) You have to add delimiters where required by syntax – a space after { and a ; before the }: a(){ for i ...;}.

so basically you used magic. That's pretty amazing tbh.

Python 3.5 + Tkinter, 235 bytes:
from tkinter import*;C=Canvas(Tk(),height=126,width=175,bg='#d72828');C.pack();X=lambda*a:C.create_rectangle(a,fill='#0048E0',outline='#fff',width=7);X(0,0,8,8);X(0,11,8,19);X(11,0,26,8);X(11,11,26,19);C.scale('all',0,0,7,7);mainloop()

Really long, but happy with it regardless. Basically creates a canvas with a red background and then draws 4 blue rectangles with white borders over the background in the 4 corners. After the drawing is all done, the canvas is enlarged by a scale factor of 7. Displays the completed flag in a new window on a canvas with the dimensions 175 x 126.
Image of Output:

R/ggplot2, 273 bytes 270 bytes
Since we have a couple base R answers we obviously need a ggplot answer. One of the few areas where base might be better ;)
library(ggplot2);ggplot(data.frame(a=c(0,7,0,8,0),b=c(25,11,25,10,25),c=c(0,0,7,0,8),d=c(18,18,11,18,10),e=paste(c(1,2,2,3,3))),aes(xmin=a,xmax=b,ymin=c,ymax=d,fill=e))+geom_rect()+scale_fill_manual(values=c('#0048e0','white','#d72828'),g=F)+theme_void();ggsave('o.png')

Output

Ungolfed
library(ggplot2)

ggplot(
  data.frame(xmin = c(0,  7,  0,  8,  0),
             xmax = c(25, 11, 25, 10, 25),
             ymin = c(0,  0,  7,  0,  8),
             ymax = c(18, 18, 11, 18, 10),
             fill = paste(c(1, 2, 2, 3, 3)))
) +
aes(xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, fill = fill)+
geom_rect() +
scale_fill_manual(values = c('#0048e0', 'white', '#d72828'), g = FALSE) +
theme_void()

ggsave('o.png')

Edit: Thanks to plannapus for suggesting a way to shorten the fill specification.

I don't actually use ggplot2 often but isn't it possible to fill argument fill with integers rather than character strings? As in c(1,2,2,3,3)? If not, you can still coerce them into characters with paste, and it'd still be shorter: paste(c(1,2,2,3,3)) is 19 bytes instead of the 22 of c('a','b','b','c','c').

Can't be numeric or it will try fill with a gradient. Paste is a very good idea though!

Lua + LÖVE, 212 characters
f="fill"l=love
g=l.graphics
c=g.setColor
r=g.rectangle
l.window.setMode(100,72)function
l.draw()g.setBackgroundColor(0,72,224)c(-1,-1,-1)r(f,28,0,16,72)r(f,0,28,100,16)c(215,40,40)r(f,32,0,8,72)r(f,0,32,100,8)end

Sample output:

Befunge, 126 124 bytes
99>+1-:00p0 >:01-\100g>:::9`\55+`+\8\v
@_^#!:,+55$_^#`*46:+1<|!`\0:\*+`\7\+`<
"[",5g,4g,3g," m",:,,^>$1+2/::39*,
174
404
010

2 bytes golfed thanks to Zacharý
This is a text solution using ANSI escape sequences to set the colours. It outputs 50x18 characters rather than 25x18 (doubling the horizontal resolution), since that more closely matches the required dimensions when the characters aren't square. If you prefer the 25x18 resolution, though, you can simply replace the :, on line 3 with two spaces.
Sample Output

(exact colours may vary depending on the operating system)

I know that this is over a year old, but 9*,"[",5g,4g,3g," m",,^>$1+2/::3 would save 2 bytes on the third line if you use the 25x18 resolution.

It seems that this works for -4 bytes!

@Zacharý I don't think the 25x18 version really counts, because it's not the right shape, but that trick you used to compress the top loop is rather brilliant. Thanks.

Thanks, golfing syntax is what I do best on other people's code

TI-Basic (TI-84 Plus CE), 76 74 bytes
9→Ymax
-9→Ymin
16→Xmax
-9→Xmin
AxesOff
For(A,-9,9,.2
DrawF A/(X2>4 and A2>4),10
DrawF A/not(X2>1 and A2>1),11
End

This was created independently of charredgrass's answer.
-2 bytes from lirtostat
TI-Basic is a tokenized language. Ymax, Ymin, Xmax, Xmin, and AxesOff are two-byte tokens; all other tokens used are one-byte tokens.
Possibly non-competing due to color values (blue 0x0000FF, white 0xFFFFFF, red 0xFF0000).
It takes quite a while to run, but it works.
9→Ymax                           # 5 bytes, adjust window
-9→Ymin                          # 6 bytes
16→Xmax                          # 6 bytes
-9→Xmin                          # 6 bytes
AxesOff                          # 3 bytes, remove axes
For(A,-9,9,.2                    # 11 bytes, for each Y-value, -9 to 9, by 0.2
DrawF A/(X2>4 and A2>4),10       # 20 18 bytes, draw a blue point if Y^2>4 and X^2>4
DrawF A/not(X2>1 and A2>1),11    # 18 bytes, draw a red point if Y^2 or X^2 is less than 1
End                              # 1 byte

(X^2>4)/(A^2>4) -> X^2>4 and A^2>4?

I think you can win 2 bytes by reordering and using Ans for -9

Perl, 128 bytes
$b=" 0 9 27"x28;$w=" 31"x12;$r=" 26 5 5"x8;
$t="$b$w$r$w$b$b"x28;
$m=($w x8 .$r.$w x15)x4;
print"P3 100 72 31",$t,$m,$r x100,$m,$t;

(newlines added for readability, and not counted)
This is a straightforward compression of a PPM image.  A PPM is supposed to have a line length of 70 or less, but in practice all readers will accept this image that's all on a single line.  If you want to be properly portable, replace the first space in each of $b, $w and $r with a newline.
I've assumed that the RGB values supplied are in sRGB coordinates, so no need to apply any gamma correction for PPM.

Picture! :)  (Please include one.)

It's a bit too long for a data: URL.

@TobySpeight Upload to imgur first, then post it here, no need for data: URLs.

You can get this down to 104 by changing to the binary PBM format, use binary bytes in your code and change the variables slightly: https://dom111.github.io/code-sandbox/#eyJsYW5nIjoid2VicGVybC01LjI4LjEiLCJjb2RlIjoiJGI9XCJcdTAwMDBcdFx1MDAxYlwieDI4OyR9PVwiXHUwMDFmXCJ4MTI7JEA9XCJcdTAwMWFcdTAwMDVcdTAwMDVcIng4O3ByaW50XCJQNiAxMDAgNzIgMzFcIiwkXz1cIiRiJH0kQCR9JGIkYlwieDI4LCQ7PSgkfXg4IC4kQC4kfXgxNSl4NCwkQHgxMDAsJCIsImFyZ3MiOiItcDA1MTNcbi1NNS4xMC4wIiwibWltZSI6ImltYWdlL3gtcG9ydGFibGUtYml0bWFwIn0=

Javascript console, 242 bytes
c='background:#';r=c+'d72828;';b=c+'0048e0;';w=c+'fff;';console.log(('%c  '[E='repeat'](25)+'\n')[E](18),...((t=(v='b'[E](7))+'wrrw'+v+v)[E](7)+(o=(j='w'[E](7))+'wrrw'+j+j)+'r'[E](50)+o+t[E](7)).replace(/(.)/g,a=>eval(a)).slice(0,-1).split`;`)

Java with ANSI escape codes, 278 bytes
interface R{static void main(String[]a){String x=o(0,0)+"\n",l=o(4,7)+o(7,1)+o(1,2)+o(7,1)+o(4,14)+x,t=l+l+l+l+l+l+l,r=o(1,12)+o(1,13)+x,q=o(7,8)+o(1,2)+o(7,15)+x;System.out.print(t+q+r+r+q+t);}static String o(int c,int l){return"\33[4"+c+"m"+"               ".substring(0,l);}}

Remove the space after the class name, shorten the name of the args parameter to a single character, reduce the octal escape to \33 and don't count the unnecessary trailing newline character. That brings your count down to 282.

Change the class to an interface and remove the public from the method declaration. You can also remove the space after the return. This brings it down to 278.

Thanks you Joey, I added your ideas, now I am at 278 bytes, great job! =)

JavaFX, 527 bytes
import javafx.scene.*;import javafx.scene.paint.*;import javafx.scene.shape.Rectangle;public class I extends javafx.application.Application{public void start(javafx.stage.Stage s){Color w=Color.WHITE;Paint z=Paint.valueOf("#d72828");Group g=new Group();Scene n=new Scene(g,250,180,Color.valueOf("#0048e0"));g.getChildren().addAll(r(70,0,40,180,w),r(0,70,250,40,w),r(0,80,250,20,z),r(80,0,20,180,z));s.setScene(n);s.show();}Rectangle r(int x,int y,int w,int h,Paint p){Rectangle r=new Rectangle(x,y,w,h);r.setFill(p);return r;}}

Two red rectangles on two white rectangles on a blue background.
Ungolfed:
import javafx.scene.*;
import javafx.scene.paint.*;
import javafx.scene.shape.Rectangle;

public class I extends javafx.application.Application {
    public void start(javafx.stage.Stage s) {
        Color w = Color.WHITE;
        Paint z = Paint.valueOf("#d72828");
        Group g = new Group();
        Scene n = new Scene(g, 250, 180, Color.valueOf("#0048e0"));
        g.getChildren().addAll(
            r(70, 0, 40, 180, w),
            r(0, 70, 250, 40, w),
            r(0, 80, 250, 20, z),
            r(80, 0, 20, 180, z));
        s.setScene(n);
        s.show();
    }

    Rectangle r(int x, int y, int w, int h, Paint p) {
        Rectangle r = new Rectangle(x, y, w, h);
        r.setFill(p);
        return r;
    }
}

(Weirdly, if I change it to import javafx.scene.shape.*; it won't compile with Java 1.8.0_92. I'm not sure if that's a bug.)

Ruby with Shoes, 150 149 characters
Shoes.app(width:100,height:72){background'0048e0'
stroke fill'fff'
rect 28,0,15,72
rect 0,28,99,15
stroke fill'd72828'
rect 32,0,7,72
rect 0,32,99,7}

Thanks to:

Eʀɪᴋ ᴛʜᴇ Gᴏʟғᴇʀ for suggesting to use hex code for white (-1 character)

Sample output:

Can't do fill'fff' instead of fill white for -1?

Doh. You are right, @EʀɪᴋᴛʜᴇGᴏʟғᴇʀ. I remembered having some issues with shortening hex color codes earlier and not tried it this time.

FLIF, 48 bytes
I'm surprised that no (bitmap) image formats have been used as answers here. A well compressed PNG comes in at a respectable 132 bytes (thanks to tools like pngout, pngcrush and optipng). However, I encountered another intriguing format that does even better! Using FLIF (Free Lossless Image Format) and some manual trimming I got down to 48 bytes:
4c46 4649 3133 6400 4800 4023 eb51 1272
9034 113b 7727 a2b6 fdac dc4e c1ae 6cf8
4a00 fc03 2064 7772 dc38 97a7 63f2 0a03

Viewing the image with viewflif gives the expected output:

EDIT: Added link to FLIF web site.

SVG+HTML, 134

<svg><path d="m0,2h100v72H0"fill="#0048e0"/><path d="M0 32H30V0h12V32h60v12H42V76H30V44H0"fill='#d72828'stroke="#fff"stroke-width='4'>

Cheated a bit in that the rectangle is slightly offset so that I can use a second path with a red fill and white outline to draw the cross. This emerged as an idea while making suggestions to golf nicael's SVG+JS answer further and ended up as a complete rewrite of the SVG in question. In fact, this is pure SVG anyway, it just needs the HTML parser, so has to be put into an HTML file.

HTML+CSS, 225 bytes
I liked Nicael's answer, but I found a way to draw the bars in less bytes.

   *{position:fixed;width:100px;margin:0}a{background:#0048E0;height:72px}b,c{box-shadow:0 0 0 4px #FFF;}b,c,d{background:#D72828}b,d{width:8px;left:32px}b{height:72px}c{height:8px;top:32px}d{height:16px;top:28px
<c><d>

box-shadow is a nice idea.

HTML+CSS, single element, 321

Needs quirks mode to run, so the snippet below has the errors fixed:

SVG pattern, 250
<svg><pattern id="a"width=9 height=9 patternUnits="userSpaceOnUse"patternTransform="translate(55,55),scale(10)"><path d="M0,0H7V7H0" fill="#0048e0"/><path d="M8,0V9M9,8H0"stroke="#d72828"fill="none"/></pattern><path d="M0,0H125V90H0" fill="url(#a)"/>

A square blue path, a red stroke (of default stroke-width) and all that scaled and offset into another path. Needs to be placed into HTML to work.

Welcome to PPCG!

TRS-80 Color Computer BASIC, 133 bytes
This one is a little off on the widths, but some of that is due to characteristics of the semi-graphics mode.  In the emulator, the screen is 512x384 even though the actual programming is lower resolution.  This color mode only supports 8 colors plus black, and the algorithm is a sort of threshold heat map which is using math to determine the color value to use if it gets within a certain range of the cross axes. The number 3 is blue, 5 is white, and 4 is red.  Logical TRUE is -1, and FALSE is 0, so I leveraged that to add two to blue to make white, and subtract one to made red.  I could have golfed further and removed some decimals sacrificing accuracy to gain 16 bytes.
1FORY=0TO31:FORX=0TO63:C=3-2*((ABS(21.5-X)<5.5)OR(ABS(15.5-Y)<4.5))+((ABS(21.5-X)<3.5)OR(ABS(15.5-Y)<2.5)):SET(X,Y,C):NEXT:NEXT:GOTO1

Ungolfed, and more conventional styling:
10 FOR Y=0 TO 31
20 FOR X=0 TO 63
30 C=3-2*((ABS(21.5-X)<5.5) OR (ABS(15.5-Y)<4.5)) + ((ABS(21.5-X)<3.5) OR (ABS(15.5-Y)<2.5))
40 SET(X,Y,C)
50 NEXT X
60 NEXT Y
70 GOTO 10

I used the JS Mocha online interpreter, which made me feel all warm and fuzzy and want to take my CoCos out of the attic.
Technically, I didn't need to have the last GOTO statement (6 bytes), but I left it in to keep the final result from scrolling off the screen a couple of lines as soon as it finished drawing.

GLSL + shadertoy, 193 190 187 179 bytes
void mainImage(out vec4 f,vec2 p){vec2 a=abs(p/iResolution.xy*vec2(25,18)-9.);int c=int(min(a.x,min(a.y,2.)));f=vec4(c==0?vec3(215,40,40):c==1?vec3(255):vec3(0,72,224),255)/255.;}
The aspect ratio will be correct as long as the window/screen size is 25:18.
Can be tested at https://www.shadertoy.com/new
I wanted to use an array lookup in the last statement, but it seems I can't really make an array of vectors :/
Additional thanks going to @GáborFekete for tips for further golfing.
Screenshot:

You can save 3 bytes by removing the in keyword in the mainImage argument.

Oh yeah, forgot about it. Thank you!

Also remove trailing zeros in floating values. And I'm not sure if it works on all browsers and OSes but try to assign only the .rgb values of the variable f.

trailing zeroes are necessary, without them there are "incompatible types" errors. (maybe it also works slightly differently depending on implementation) also I guess the second suggestion would be UB, but maybe I'll try later

I meant write 2. instead of 2.0.

Wow. Didn't know about this

vec3(255,255,255) can be shorted to vec3(255)

Maple 231 bytes
macro(t=thickness,w=white,c=color):
plots:-display(
plot([],background=blue),
plot(9,0..25.2,t=48,c=w),
plot([9,y,y=0..18.2],t=48,c=w),
plot(9,0..25.2,t=24,c=red),
plot([9,y,y=0..18.2],t=24,c=red),
scaling=constrained,view=[0..25,0..18]);

Added newlines for readability. This code uses a couple of aliases for repeated terms.

Another method, which is slightly cleaner and produces a slightly more crisp image but longer (285 without aliases) is:
plots:-display(
plottools:-rectangle([0,8],[25,10],color=red),
plottools:-rectangle([8,0],[10,18],color=red),
plottools:-rectangle([0,7],[25,11],color=white),
plottools:-rectangle([7,0],[11,18],color=white),
plottools:-rectangle([0,0],[25,18],color=blue),
style=polygon,scaling=constrained);

Python Turtle, 233 bytes
from turtle import*
import tkinter as _
_.ROUND=_.BUTT
S=8
c=color
w=width
h=18*S
c("navy")
w(h)
fd(25*S)
c("white")
w(4*S)
home()
pu()
goto(9*S,-9*S)
lt(90)
pd()
fd(h)
c("#d72828")
w(S+S)
bk(h)
pu()
home()
pd()
fd(25*S)
ht()
done()

One feature of this implementation is that I sacrificed 15 bytes to make it scalable so you can set S to anything from 1:

to however large you wish.  If you want to run it under Python 2, simply change tkinter to Tkinter.

Postscript 148 characters (84 bytes when using binary shortcuts)
First of all, there are two versions: One optimized for characters, and one optimized for binary shortcuts.
Golfed character version:
/s{setrgbcolor}def/R{rectfill}def 0.843 0.157 0.157 s 0 8 25 2 8 0 2 18 R R 0 0.282 0.878 s 0 0 7 7 0 11 7 7 8 copy R R 11 0 translate 2 1 scale R R

Less golfed version (character optimised):
/s {setrgbcolor} def
/R {rectfill} def
0.843 0.157 0.157 s
0 8 25 2
8 0 2 18
R
R
0 0.282 0.878 s
0 0 7 7
0 11 7 7
8 copy
R
R
11 0 translate
2 1 scale
R
R

Less golfed version (binary optimised):
0.843 0.157 0.157 setrgbcolor
0 8 25 2
8 0 2 18
rectfill
rectfill
0 0.282 0.878 setrgbcolor
0 0 7 7
0 11 7 7
8 copy
rectfill
rectfill
11 0 translate
2 1 scale
rectfill
rectfill

Hex of the binary representation version:

 30 2E 38 34 33 20 30 2E 31 35 37 20 30 2E 31 35 37 92 9D 30 20 38 88 19 32 88 08 30 20 32 88 12 92 80 92 80 30 20 30 2E 32 38 32 20 30 2E 38 37 38 92 9D 30 88 00 37 88 07 30 88 0B 37 88 07 38 92 19 92 80 92 80 88 0B 30 92 AD 32 20 31 92 8B 92 80 92 80

rectfill can take an array of numbers and draw multiple rectangles with one call. This can get it down to 139 bytes (by also changing the 8 copy to a dup). Also leading zeroes are not needed on the floats which brings it down to 134

C - Win32 GDI 180 bytes
#include <Windows.h>
main(i,x,y,h,v){for(i=0;i<180000;i++)h=(x=i%500)/20,v=(y=i/500)/20,SetPixelV(GetDC(0),x,y,h>7&&h<10||v>7&&v<10?2631895:h>6&&h<11||v>6&&v<11?16777215:9910272);}

Very slowly draws the flag onto the desktop:

Why SetPixelV ? Can't it be SetPixel ?

Tcl/Tk, 180 162 158
pack [canvas .c -w 100 -he 72 -bg #0048e0]
proc D {L f\ d72828} {.c cr r $L -w 0 -f #$f}
D "28 2 44 74" fff
D "2 28 102 44" fff
D "32 2 40 74"
D "2 32 102 40"

Stupid margin at the end forced me to use 102 instead of 99; I could save two bytes.

Visible at the right on http://i.imgur.com/m0bCgwT.png — you will see a vertical blue line  where it shouldn't be.

@insertusernamehere On an unrelated thing, I finally discovered the origin of the "stupid margin"; the highlightthickness attribute of canvas is by default 2 (instead of 0) — https://stackoverflow.com/a/4311134/383779

PaperScript, 149 bytes
R=Path.Rectangle
for(y=0;y<88;y+=44)R(0,y,28,28).fillColor=R(44,y,56,28).fillColor="#0048e0"
R(0,32,100,8).fillColor=R(32,0,8,72).fillColor="#d72828"

PaperScript is an extension of JavaScript based on the Paper.js vector graphics library. You can run PaperScript code directly, without having to mess with the HTML and CSS, at sketch.paperjs.org.
The code uses a loop to draw the top two blue rectangles, then the bottom two. It then adds two red rectangles to complete the flag. Try it at Paper.js Sketch!
Ungolfed
for (var y = 0; y < 88; y += 44) {
    new Path.Rectangle({
        point: [0, y],
        size: [28, 28],
        fillColor: "#0048e0"
    });
    new Path.Rectangle({
        point: [44, y],
        size: [56, 28],
        fillColor: "#0048e0"
    });
}
new Path.Rectangle({
   point: [0, 32],
   size: [100, 8],
   fillColor: "#d72828"
});
new Path.Rectangle({
   point: [32, 0],
   size: [8, 72],
   fillColor: "#d72828"
});

Output

PostScript, 152 150 149 bytes
Golfed version:
9 9 scale 0 .282 .878 setrgbcolor 0 0 25 18 rectfill 1 setgray[0 7 25 4 7 0 4 18]rectfill .843 .157 dup setrgbcolor[0 8 25 2 8 0 2 18]rectfill showpage

Ungolfed version:
9 9 scale                     % over-all scaling
0 .282 .878 setrgbcolor       % set blue color
0 0 25 18 rectfill            % blue rectangle
1 setgray                     % set white color
[0 7 25 4 7 0 4 18] rectfill  % white cross
.843 .157 dup setrgbcolor     % set red color
[0 8 25 2 8 0 2 18] rectfill  % red cross
showpage

Result:

Batch, 226 bytes
@echo off&set a=.......
set l=␛[107m.%a%␛[41m..␛[107m.%a%%a%
:s
for /l %%i in (1,1,7)do echo ␛[44m%a%␛[107m.␛[41m..␛[107m.␛[44m%a%%a%
if not defined t echo %l%&echo ␛[41m%a%....%a%%a%&echo:%a%....%a%%a%&echo %l%&set t=0&goto:s

␛ is used to represent the nonprintable  character.

BASH - 157 bytes
r=\\e[41m;b=\\e[44m;w=\\e[47m;d=\\e[0m;for i in {1..18};{ n=$b;j=$w;((i==8||i==11))&&n=$w;((i==9||i==10))&&n=$r j=$r;printf "$n%14s$j  $r%4s$j  $n%28s$d\n";}

Ungolfed version for better readability:
r=\\e[41m
b=\\e[44m
w=\\e[47m
d=\\e[0m

for i in {1..18};{
    n=$b;j=$w
    ((i==8||i==11))&&n=$w
    ((i==9||i==10))&&n=$r j=$r
    printf "$n%14s$j  $r%4s$j  $n%28s$d\n"
}

The result

R, 258 bytes
plot(c(0,250),c(0,180),type="n",ann=F)
rect(0,110,70,180,col="blue")
rect(0,0,70,70,col="blue")
rect(110,0,250,70,col="blue")
rect(110,110,250,180,col="blue")
rect(0,80,250,100,col="red",border="transparent")
rect(80,0,100,180,col="red",border="transparent")

instead of using xlab="",ylab="", why not ann=F?

Can You omit the trailing line break? (-1) Can R draw one blue rectangle, overwrite that with two white rects and those with two red ones? (-71)

PHP (CLI-Only), 277 chars
<?f();r(7,25);r(1,25);r(1,25);r(7,25);f();function f(){for($c=0;$c<7;$c++){r(4);b(7);b(1);b(1);b(7);r(4,14);echo"\n";}}function r($c,$w=7){for($i=0;$i<$w;$i++)if($c==7&&$w==25)if($i==8||$i==9)b(1);else b($c);else b($c);if($w==25)echo"\n";}function b($c){echo"\033[01;3{$c}m█";}

I'm using console colors and these blocky things to make it look like this:

It looks odd because the height is like 2.5x the width.

Finally an answer using PHP. You can save a few bytes – here's a 265 bytes version: f();r(7,25);r(1,25);r(1,25);r(7,25);f();function f(){for(;$c++<7;){r(4);b(7);b(1);b(1);b(7);r(4,14);echo"⏎";}}function r($c,$w=7){for(;$i<$w;$i++)if($c==7&&$w==25)if($i==8||$i==9)b(1);else b($c);else b($c);if($w==25)echo"⏎";}function b($c){echo"\033[01;3{$c}m█";} (Replace ⏎ with an actual newline.)

@insertusernamehere your script has an error when executing for me.

Which error do you get? Did you replace ⏎ with a real newline? Tested it in 5.5 - I don't have a PHP 7 console right now to verify.

@insertusernamehere variable $i was not defined.

This will be a notice then, right? Notices can be ignored when golfing. ;)

@insertusernamehere no, your script doesn't output the flag

ImageScript, 145 bytes
hex("0048e0");rect(0,0,156,156);rect(0,244,156,156);rect(244,0,366,156);rect(244,244,366,156);hex("d72828");rect(0,178,600,44);rect(178,0,44,400)

Fairly straightforward. Just changes colors and draws rectangles
NOTE: When this is loaded into the website, the website automatically adds new lines after semicolons. The program still works fine without them
(By default, image size is 600x400)
Try it online!

PHP with GD, 256 253 244 238 bytes
saved 9 bytes thanks to insertusernamehere, manatwork reminded me of another 6.
<?$a=imageColorAllocate;$f=imageFilledRectangle;$a($g=imagecreate(100,72),0,72,224);$f($g,28,0,43,71,$w=$a($g,-1,-1,-1));$f($g,0,28,99,43,$w);$f($g,32,0,39,71,$r=$a($g,215,40,40));$f($g,0,32,99,39,$r);header('Content-Type:');imagegif($g);

call in web browser
for Android: insert image/gif behind Content-Type: (+9)

I've tested it on OS X in Safari, Chrome and Firefox and every browser showed the image correctly using only: header('Content-Type:') - could save 9 bytes. Please verify it yourself first. ;)

confirmed on Windows, Ubuntu and iOS; fails on Android 4.

You could move the assignment to color variables to their first use: $f($g,28,0,43,71,$w=$a($g,-1,-1,-1));. Same for $r.

KV(lang), 730 B :D
Not a competing answer, rather showing a language Kivy uses to make designing its widgets easier. The language requires indentation and newlines, therefore I'm forced to leave it in this shape. Kivy also takes rgb(a) as a color input, so I need to convert it and although there's a built-in, it's surely not suitable for golfing. :D
I'm traveling and with Kivy I'm able to code even on android. + its code is already crossplatform in I think 9/10 cases. ^^
#:import h kivy.utils.rgba
<F>:
    canvas:
        Color:
            rgb: h('#d72828')
        Rectangle:
            size: [100,72]
        Color:
            rgb: h('#ffffff')
        Rectangle:
            pos: [40,0]
            size: [60,32]
        Rectangle:
            pos: [40,40]
            size: [60,32]
        Rectangle:
            pos: [0,40]
            size: [32,32]
        Rectangle:
            size: [32,32]
        Color:
            rgb: h('#0048e0')
        Rectangle:
            pos: [44,0]
            size: [56,28]
        Rectangle:
            pos: [44,44]
            size: [56,28]
        Rectangle:
            pos: [0,44]
            size: [28,28]
        Rectangle:
            size: [28,28]

To run it you need to install Kivy and either save it as a .kv file, or have something like this in Python to parse it as a string:
from kivy.lang import Builder
from kivy.base import runTouchApp
from kivy.uix.boxlayout import BoxLayout
Builder.load_string('''KVstring''')
class F(BoxLayout):pass
runTouchApp(F())

Does kv also allow console output, or just GUI widgets?

@Pavel well, you still need kivy installed to be able to run it, but otherwise everything after : is python, so it can have console output or just return widgets(gui).

Javascript ES6, 200 bytes
Yes, it is huge. I decided to do text outputting instead of table fiddling and stuff.

N='
',B=(_,t=1)=>`<font color=#${['fff','0048e0','d72828'][_|0]}>@`.repeat(t);C=B(1,7)+B()+B(2,2)+B()+B(1,14)+N;document.body.innerHTML=C+C+C+(L=B(0,8)+B(2,2)+B(0,15)+N)+B(2,25)+N+B(2,25)+N+L+C+C+C

This does not work well on Firefox, but works fully on Google Chrome.

Nice touch using  - brings back some old memories. :)

Scala, 219 bytes
Inspired by Titus' bash solution, not very Scala-like. Also, the colors are off and the "pixels" are not square.
object O{def main(a:Array[String])={val e="\u001B[";val(b,r,w,n,s)=(e+"44m",e+"41m",e+"47m",e+"0m\n"," "*7);val(x,y,z)=(s"$b$s$w $r  $w $b$s$s$n",s"$w$s $r  $w $s$s$n",s"$r${s*3}    $n");print(s"${x*7}$y$z$z$y${x*7}")}}`

ungolfed:
object O{
  def main(a:Array[String])={
    val e="\u001B["; // escape sequence for color codes
    val(b,r,w,n,s)=(
      e+"44m", // blue background
      e+"41m", // red background
      e+"47m", // white background
      e+"0m\n",// color off + newline
      " "*7);  // seven spaces
    val(x,y,z)=(
      s"$b$s$w $r  $w $b$s$s$n", // 7*blue,white,red,red,white,14*blue
      s"$w$s $r  $w $s$s$n",     // 8*white,2*red,15*white
      s"$r${s*3}    $n");        // 3*7+4=25*red
    print(s"${x*7}$y$z$z$y${x*7}") // print the individual lines
  }
}

Idea: The program uses (bash) color escape sequences to set the background color on the console. It then draws a number of space characters in the respective background color. The image consists of 18 lines of 25 spaces; the first seven and the last seven lines represented by variable x, the two (completely red) middle lines by z, and y represents the two white-and-red lines above/below.
To save bytes, variable s represents seven consecutive spaces; for smaller cases, the spaces are used literally (i.e. the four consecutive spaces in variable z are necessary).

C#, 356 272 bytes

Golfed
()=>{Action f=Console.WriteLine;Action<int,int>o=(c,l)=>{Console.BackgroundColor=(ConsoleColor)c+8;Console.Write(new char[l]);};for(int d=1,i=0;i>-1;i+=d){if(i<7){o(1,7);o(7,1);o(4,2);o(7,1);o(1,14);}if(i==7){o(7,8);o(4,2);o(7,15);}if(i>7){o(4,25);f();o(4,25);d=-1;}f();}}

Ungolfed
() =>
{
    Action f = Console.WriteLine;
    Action<int, int> o = (c, l) =>
    {
        Console.BackgroundColor = (ConsoleColor)c + 8;
        Console.Write(new char[l]);
    };
    for (int d = 1, i = 0; i > -1; i += d)
    {
        if (i < 7)
        {
            o(1, 7);
            o(7, 1);
            o(4, 2);
            o(7, 1);
            o(1, 14);
        }
        if (i == 7)
        {
            o(7, 8);
            o(4, 2);
            o(7, 15);
        }
        if (i > 7)
        {
            o(4, 25);
            f();
            o(4, 25);
            d = -1;
        }
        f();
    }
}

By the rules anonymous delegates are allowed as long as the answer includes an example of how to run it...
using System;
class P
{
    static void Main()
    {
        new Action(
/*replace this with delegate*/
        )();
    }
}

KA Processing, 79 bytes
stroke(255);background(0,72,224);fill(215,40,40);rect(0,8,25,2);rect(8,0,2,18);

Try it here!

stroke(-1) is one byte shorter than stroke(255)

Common Lisp (Lispworks), 465 bytes
(capi:contain(make-instance'capi:output-pane :display-callback #'(lambda(#4=pane x y #5=width #6=height)(let((a(/ #5# 25))(b(/ #6# 18)))(progn(#1=gp:draw-rectangle #4# x y #5# #6# #2=:filled t #3=:foreground :blue)(#1# #4# x(+ y(* b 7))#5#(+ y(* b 4))#2# t #3# :white)(#1# #4#(+ x(* a 7))y(+ x(* a 4)) #6# #2# t #3# :white)(#1# #4# x(+ y(* b 8))#5#(+ y(* b 2))#2# t #3# :red)(#1# #4#(+ x(* a 8))y(+ x(* a 2))(+ y(* b 18))#2# t #3# :red)))):width 200 :height 144))

ungolfed:
    (defun draw-a-flag (pane x y width height)
      (let ((a (/ width 25)) (b (/ height 18)))
        (progn
          (gp:draw-rectangle pane x y width height :filled t :foreground :blue)
          (gp:draw-rectangle pane x (+ y (* b 7)) width (+ y (* b 4)) :filled t :foreground :white)
          (gp:draw-rectangle pane (+ x (* a 7)) y (+ x (* a 4)) height :filled t :foreground :white)
          (gp:draw-rectangle pane x (+ y (* b 8)) width (+ y (* b 2)) :filled t :foreground :red)
          (gp:draw-rectangle pane (+ x (* a 8)) y (+ x (* a 2)) (+ y (* b 18)) :filled t :foreground :red))))

    (capi:contain
     (make-instance
      'capi:output-pane
      :display-callback 'draw-a-flag)
     :best-width 200
     :best-height 144)

Usage:

ZX Spectrum Z80 assembly, 55 Bytes
1st attempt.
     org 8000H

start:

     ld hl,5800h
     ld c,18
main:

     ld de,120*256+8
     ld a,c
     sub e
     jr c, line
     jr z,white_line
     sub 3
     jr c,red_line
     jr nz,line

white_line:

     ld e,d
     jr line

red_line:

     ld de,16*256+16

line:

     ld a,16
     ld b,7

first_bit:

     ld (hl),e
     inc hl
     djnz first_bit
     ld (hl),d
     inc hl
     ld (hl),a
     inc hl
     ld (hl),a
     inc hl
     ld (hl),d
     ld b,15

next_bit:

     inc hl
     ld (hl),e
     djnz next_bit
     ld de,7
     add hl,de
     dec c
     jr nz,main
     ret

     end

Lua + LÖVE, 195 bytes
Very close to the other Lua + LÖVE answer but a bit different and shorter.
l=love
g=l.graphics
c=g.setColor
r=g.rectangle
m=255
e=100
p=72
f='fill'function
l.draw()c(0,p,224,m)r(f,0,0,e,p)c(m,m,m,m)r(f,0,28,e,16)r(f,28,0,16,p)c(215,40,40,m)r(f,0,32,e,8)r(f,32,0,8,p)end

Output:

OCL, 232 177 bytes
Function a b c d e DrawRectangle b c d e End ShowCanvas SetFillColor 0 72 224 a 0 0 28 28 a 44 0 56 28 a 0 44 28 28 a 44 44 56 28 SetFillColor 215 40 40 a 32 0 8 72 a 0 32 100 8

I made the DrawRectangle function shorter, and removed the canvas resize. Produces this image:

Small Basic, 215 bytes
A Script that takes no input and outputs to the GraphicsWindow Object
a=0
b=0
c=25
d=9
x="#0048E0
p()
b=7
d=2
x="White
p()
a=7
b=0
c=4
d=9
p()
a=0
b=8
c=25
d=1
x="#D72828
p()
a=8
b=0
c=2
d=9
p()
Sub p
GraphicsWindow.BrushColor=x
GraphicsWindow.FillRectangle(a*25,b*25,c*25,d*50)
EndSub

Try it at SmallBasic.com! Requires IE/Silverlight
Output

JavaScript + HTML, 159 bytes

c=C.getContext`2d`;r=(o,w,s)=>{c.fillStyle=s;c.fillRect(o,0,w,72);if(o)c.fillRect(0,o,100,w)};r(0,100,'#0048e0');r(28,16,'#fff');r(32,8,'#d72828')
<canvas id=C>

I noticed that this question mentioned "HTML canvas" in the description mentioned, but there were no answers that used one (yet). As a bonus, you can run this in your browser. Here is a less-golfed version:
// get canvas's 2D drawing context
c=C.getContext`2d`;

// function to draw a rectangle
r=(o,w,s)=> {
    c.fillStyle=s;
    c.fillRect(o,0,w,72);
    if(o)c.fillRect(0,o,100,w)
};

// the blue background
r(0,100,'#0048e0');

// the white stripes
r(28,16,'#fff');

// the red stripes
r(32,8,'#d72828')

pdfTeX, 108 bytes
\def~{ w 9 0 m 9 18 l s 0 9 m 25 9 l s }\pdfliteral{0 .28 .88 rg 0 0 25 18 re f 1 G 4~.84 .16 .16 RG 2~}\bye

Desmos, 150 bytes
b=rgb(0,72,224)
r=rgb(215,40,40)
w=hsv(0,0,1)
0<=x<=25\{0<=y<=18\}
7<=x<=11\{0<=y<=18\}
0<=x<=25\{7<=y<=11\}
0<=x<=25\{8<=y<=10\}
8<=x<=10\{0<=y<=18\}

Try it on Desmos!
This should work, but it doesn't due to a bug where it shows white lines:
Desmos, 124 bytes
r=rgb(215,40,40)
w=hsv(0,0,1)
c=[rgb(0,72,224),w,w,r,r]
[0,7,0,0,8]<=x<=[25,11,25,25,10]\{[0,0,7,8,0]<=y<=[18,18,11,10,18]\}

Try it on Desmos!

Go + github.com/fogleman/gg, 343 334 bytes
import(."image/color";."github.com/fogleman/gg";."os")
func f(){C,W,R:=NewContext(100,72),White,RGBA{255,0,0,255}
for _,i:=range[]struct{c Color;x,y,w,h float64}{{RGBA{0,72,224,255},0,0,100,72},{W,0,28,100,16},{W,28,0,16,72},{R,0,32,100,8},{R,32,0,8,72}}{C.SetColor(i.c)
C.DrawRectangle(i.x,i.y,i.w,i.h)
C.Fill()}
C.EncodePNG(Stdout)}

Try it on the Go Playground!
A whopping -11 -20 bytes  from using an external package. Does the same thing as the one below without an external package.
Changelog

-9 bytes from using an anonymous struct.

Go, 376 354 bytes (no external packages)
import(."image";c"image/color";d"image/draw";p"image/png";."os")
func f(){N,S,R,D,P:=NewUniform,d.Src,Rect,d.Draw,Point{0,0}
F,x,y:=NewRGBA(R(0,0,100,72)),N(c.RGBA{255,0,0,255}),N(c.White)
D(F,F.Bounds(),N(c.RGBA{0,72,224,255}),P,S)
D(F,R(0,28,100,44),y,P,S)
D(F,R(28,0,44,72),y,P,S)
D(F,R(0,32,100,40),x,P,S)
D(F,R(32,0,40,72),x,P,S)
p.Encode(Stdout,F)}

Attempt This Online!
Writes a PNG to STDOUT.
Changelog

-22 bytes by @The Thonnu

Ungolfed Explanation
func iceland() {
    N, S, R, D, P := NewUniform, d.Src, Rect, d.Draw, Point{0, 0}
    F := NewRGBA(R(0, 0, 100, 72))                           // create the image
    D(F, F.Bounds(), N(c.RGBA{0, 72, 224, 255}), P, S)       // background
    D(F, R(0, 28, 100, 44), N(c.White), P, S)                // horizontal white stripe
    D(F, R(28, 0, 44, 72), N(c.White), P, S)                 // vertical white stripe
    D(F, R(0, 32, 100, 40), N(c.RGBA{255, 0, 0, 255}), P, S) // horizontal red stripe
    D(F, R(32, 0, 40, 72), N(c.RGBA{255, 0, 0, 255}), P, S)  // vertical red stripe
    p.Encode(Stdout, F)                                      // output a PNG to STDOUT
}

354 by assigning N(c.RGBA{255,0,0,255}) and N(c.White) to x and y

Chipmunk BASIC, 238 235 bytes
Chipmunk Basic v368b2.02 on MacOS. The RGB range is [0,100].
graphics 0
graphics color 0,28,88
graphics fillrect 0,0,150,108
graphics color 100,100,100
graphics fillrect 42,0,66,108
graphics fillrect 0,42,150,66
graphics color 84,16,16
graphics fillrect 0,48,150,60
graphics fillrect 48,0,60,108

C (GCC), 167 140 bytes
- ~25 bytes thanks to @ceilingcat
i=-36;main(j,g){for(write(1,"P6 100 72 255 ",14);i<37;i-=~!i)for(j=-36;j<65;j-=~!j)g=abs(i*i<j*j?i:j),write(1,g>4?g>8?"\0Hà":"ÿÿÿ":"×((",3);}

Set encoding to ANSI, so each character corresponds to a single byte, and replace \0 with a NUL byte. Outputs to stdout a PPM image.

ZX Spectrum Z80 assembly, 49, 47 46, 47 bytes
Program when running uses 47 bytes + 4 for stack usage
 stack usage is 2 bytes to store return address and 2 for internal use
It uses no other programs and uses no other external Ram/Rom
The output is the modification of the video Ram.
Brief idea of how program draws flag.
The background is coloured blue.
Then if vertically or horizontally in the red area draw red. (offset 9 and 10)
Then if vertically or horizontally in the white area draw white, only if the background is not already coloured in red. (offset 8 and 11)
          org   8000H
red:      equ   16
white:    equ   120
blue:     equ   8
;
start:

          ld    hl,5800h
          ld    c,18
main:
          ld    b,25
loop:
          ld   de,red*256+blue
          ld   (hl),e
          ld   a,c
          call check
          ld   a,l
          and  31
          call check
          inc  hl
          djnz loop
          ld   d,b
          add  hl,de
          dec  hl
          dec  c
          jr   nz,main
          ret

check:
          sub   e
          ret   c
          jr    z,white_line
          sub   3
          jr    z,white_line
          ret   nc
          ld    (hl),d
white_line:
          ld    a,d
          cp    (hl)
          ret   z
          ld    (hl),white
          ret

          end

;         47 bytes

Original code 49 bytes
edit 1  47 bytes  changed logic flow
edit 2  46 bytes  removed a ret
edit 3  47 bytes. fixed output to exact dimensions

Indent all code by 4 spaces to make it into a code block. If you have the output as an image or screenshot you can upload it and include it in your answer. The toolbar in the answer textarea can give you a lot of tips about formatting, clicking the question mark gives you some info about the markdown syntax used here. Also, consider adding a header (add === under a line of text) with <languge>, <# of bytes> bytes.

Additionally, you should edit any answers that you already have to an answer rather than post a revised version as a new answer.

AHK, 194 Bytes
s=w100 h72 x0 y0 Q0048E0|wp h16 x0 y28 QWhite|w16 h72 x28 y0 QWhite|w100 h8 x0 y32 QD72828|w8 h72 x32 y0 QD72828
s:=StrReplace(s,"Q","Background")
Loop,Parse,s,"|"
GUI,Add,Progress,%A_LoopField%
GUI,Show

Is the initial string for all the parameters that eats up all the bytes.

Pikchr, 130 bytes
color=-1
boxwid=50
boxht=36
define@{
box at-$1,0fill}
box fill 18656@(7)white wid 8@(0)white ht 8@(7)0xd72828wid 4@(0)0xd72828ht 4

Output

<svg xmlns="http://www.w3.org/2000/svg" class="xd-pikchr" viewBox="0 0 7204.32 5188.32">
<path d="M2,5186L7202,5186L7202,2L2,2Z" style="fill:rgb(0,72,224);"></path>
<path d="M2018,5186L3170,5186L3170,2L2018,2Z" style="fill:rgb(255,255,255);"></path>
<path d="M2,3170L7202,3170L7202,2018L2,2018Z" style="fill:rgb(255,255,255);"></path>
<path d="M2306,5186L2882,5186L2882,2L2306,2Z" style="fill:rgb(215,40,40);"></path>
<path d="M2,2882L7202,2882L7202,2306L2,2306Z" style="fill:rgb(215,40,40);"></path>
</svg>

Explanation

color = -1: disable outlines
boxwid = 50: set the default box width to 50
boxht = 36: set the default box height to 36
define @ {…}: define a macro named @ which expands to the content of the curly braces, replacing $1 with its argument
box fill 18656: draw a rectangle with the center at (0,0) filled with color #0048e0
box at -7,0 fill white wid 8: draw a rectangle with the center at (-7,0) with width 8 filled white
box at -0,0 fill white ht 8: draw a rectangle with the center at (0,0) with height 8 filled white
box at -7,0 fill 0xd72828 wid 4: draw a rectangle with the center at (-7,0) with width 4 filled with color #d72828
box at -0,0 fill 0xd72828 ht 4: draw a rectangle with the center at (0,0) with height 4 filled with color #d72828

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes