Skip to main content
8 of 8
deleted 3 characters in body
primo
  • 33.5k
  • 5
  • 61
  • 139

PHP, 70 bytes

0000000: 424d 0000 0000 0000 0000 2300 0000 0c00  BM........#.....
0000010: 0000 2001 c000 0100 0800 a455 00ff ffff  .. ........U....
0000020: 3541 ef3c 3f66 6f72 283b 3665 343e 2469  5A.<?for(;6e4>$i
0000030: 3b29 6563 686f 2063 6872 2824 692b 2b2f  ;)echo chr($i++/
0000040: 3936 2533 293b                           96%3);

The above is a hexdump which may be reversed with xxd -r. Alternatively, it may also be generated with the following PHP script:

<?=hex2bin('424d0000000000000000230000000c0000002001c00001000800a45500ffffff3541ef3c3f666f72283b3665343e24693b296563686f206368722824692b2b2f39362533293b');

I assume default settings, as they are without an .ini (you may disable your local .ini with the -n option). Produces a .bmp image (288 x 192), which should be piped to a file. This is as large as I can make it without affecting the byte count.


Sample Usage

$ xxd -r in.hex > france.php
$ php -n france.php > out.bmp
$ out.bmp

Output

French Flag

primo
  • 33.5k
  • 5
  • 61
  • 139