On Sun, 1 Jul 2007 06:29:18 +0200 pancake <[EMAIL PROTECTED]> wrote: > Documentation: > > Images are composed by '.' and 'X' or '0' and '1' in ascii one row > per line file: > > $ cat x > .... .... .... .... > .... .... .... .... > ..XX .... .... XX.. > ...X X... ...X X... > .... XX.. ..XX .... > .... .XX. .XX. .... > .... ..XX XX.. .... > .... ..XX XX.. .... > .... .XX. .XX. .... > .... XX.. ..XX .... > ...X X... ...X X... > ..XX .... .... XX.. > .... .... .... .... > > This image should be converted into a oneline format. This is one bit > per pixel in hexadecimal. So 8 bytes per line: > > $ ./icon < x > 0000 0000 300c 1818 0c30 0660 03c0 03c0 0660 0c30 1818 300c 0000
Why, o why, inventing yet another image format. What's wrong with X11's (de facto) native pixmap format, XPM (_X_ Pixmap)? There are already a sea of tools to handle it, it's an ASCII format and is simple enough too. X11 even comes with a library for easy usage of the format. http://koala.ilog.fr/lehors/xpm.html An example: /* XPM */ static char * roundb_xpm[] = { /* width height ncolors cpp [x_hot y_hot] */ "13 13 5 2 7 7", /* colors */ " s none m none c none", ". s topShadowColor m white c lightblue", "X s iconColor1 m black c black", "o s bottomShadowColor m black c #646464646464", "O s selectColor m white c red", /* pixels */ " ", " . . . ", " . . X X X o o ", " . X X X X X X X o ", " . X X X X X X X o ", " . X X X X O X X X X o ", " . X X X O O O X X X o ", " . X X X X O X X X X o ", " . X X X X X X X o ", " . X X X X X X X o ", " o o X X X o o ", " o o o ", " " }; Greetings, Denis
