XXIIVV

ICN is a 1-bit graphics format.

The ICN file contains a series of bits equivalent to pixels in a 8x8 tile. The data for each tile is made up of 64 bits, or 8 bytes, in which each bit is a pixel. An ICN is the first half of a chr file. This is the standard format for Varvara ecosystem, to view and edit icn files, try Noodle.

ch1hex
0000000000
001111003c
0100001042
011111107e
0100000040
0100001042
001111003c
0000000000

Example

24x24 ICN Sprite
0003 6331 397b 77f8 c0f0 f7ff fff0 8003
1c7e feff 0f07 078e f860 0c07 0300 301f
071f 7cf8 f007 7fff dcc0 c000 70f8 f8b0
0f07 4143 677f 7f3e ffe3 87cf cfcf 8703
84c4 8406 0efe fcf8 	

Implementation

Uint8 tile[8] = {0x00, 0x3c, 0x42, 0x7e, 0x40, 0x42, 0x3c, 0x00};

void
draw_icn(int x, int y, Uint8 *sprite, Uint32 color)
{
	int y2 = y + 8, h;
	for(; y < y2; y++, sprite++)
		for(h = 0; h < 8; h++)
			if(*sprite << h & 0x80)
				draw_pixel(x + h, y, color);
}

incoming dexe noodle adelie moogle metadata potato basic nmt format ufx format ulz format sixels proquints varvara