$ xxd -i icon.pngCopy the hex lines into your source:
unsigned char icon_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10,
0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x91, 0x68, 0x36, 0x00, 0x00, 0x00,
0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
0x00, 0x8d, 0x49, 0x44, 0x41, 0x54, 0x28, 0xcf, 0x9d, 0x92, 0x41, 0x0e,
0xc3, 0x20, 0x0c, 0x04, 0xc7, 0x56, 0xc5, 0x03, 0xa2, 0x7e, 0xb4, 0x27,
0xde, 0x90, 0x13, 0xef, 0x85, 0x4a, 0x56, 0x0f, 0x31, 0x14, 0x51, 0x1a,
0xda, 0xec, 0xc9, 0x02, 0x0f, 0xac, 0x17, 0x24, 0xcb, 0xc6, 0xa1, 0x5d,
0x79, 0xb0, 0xd4, 0xcd, 0x5b, 0x81, 0x68, 0xb0, 0x66, 0x24, 0xcb, 0x46,
0x51, 0x80, 0x04, 0xd1, 0xbc, 0xfe, 0x2e, 0xe5, 0x4f, 0x75, 0x40, 0x34,
0xf7, 0xb6, 0x06, 0x82, 0x11, 0xcc, 0x87, 0x0e, 0xe6, 0x3b, 0xad, 0x18,
0x87, 0x2e, 0x7a, 0xd5, 0xd2, 0x45, 0x60, 0x57, 0x77, 0x78, 0x28, 0x55,
0xc3, 0x75, 0x45, 0xf2, 0xf3, 0x3e, 0x32, 0xa9, 0x66, 0x50, 0x94, 0x30,
0x06, 0x3d, 0x03, 0xda, 0xd0, 0x33, 0x40, 0x27, 0xc7, 0xb7, 0xd0, 0x7a,
0x87, 0x69, 0x79, 0xc3, 0xd4, 0xe1, 0x4f, 0x40, 0xef, 0xd0, 0x3f, 0xdf,
0x79, 0x5f, 0x4b, 0xef, 0xfd, 0x5b, 0x4f, 0xf4, 0xf1, 0xac, 0x2f, 0x59,
0xca, 0x36, 0xcb, 0xec, 0xe8, 0x2f, 0xba, 0x00, 0x00, 0x00, 0x00, 0x49,
0x45, 0x4e, 0x44, 0xae, 0x42, 0x60, 0x82
};
unsigned int icon_png_len = 211;
$
val favicon:Array[Byte] = Array(...hex values here...)Done.
People tend to forget that OS X is built upon a sturdy Unix with all the power of bash and Unix commands.
No comments:
Post a Comment