On Sun, 1 Jul 2007 16:13:32 +0200 pancake <[EMAIL PROTECTED]> wrote: > > > 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. > > For different reasons: > - I was bored > - I want a one line format > - I want an ascii-art friendly format > - I want a simple 1bit format > - This is a one-night-hack (R) > > XPM is fine for static compilations, so, for hardcoding images, but > not for parsing it on the wild. > > There's another format called xfig used by sylpheed and (maybe) other > clients. This format is also 1 bit depth and it's 'standard'. > > In reality 1 bit images are cool, but maybe would be good to support > palettes or with 4 or 8bpp. So a standard format like XPM would be > good to support. > > I think that there'r two XPM formats a binary and a ascii (c-style > like) one, and it works using a palette. So you'll be able to draw in > Gimp instead of Vim :) > > BTW vim supports xpm too and represents in ansi the colors of the > palette on the fly. That's cool too. > > At the moment it only handles 16x16x1 images, so xpm is not currently > supported. But I would like to cleanup this horrible piece of code and > start thinking on how to make it better and give't support to multiple > colors. > > I was thinking in something like: > > pal:0030a830b9200a > img:55300abb33191703749169ab9c639d47f > > When reading this formatted lines interpret them from stdin, so it > could be possible to rotate paletes instead of changing pixmaps > (common oldstyle demoscene tricks heh) > > The resolution or the depth is not reflected here, so we can use the > size of the palette to get the depth and the size of the image to get > a fixed NxN image resolution. > > Do you have another idea about how to implement this?
I already had this as a patch to wmii-2-something, using XPM. One could simply cat the XPM file into a virtual file and display icons in the bar that way (instead of just writing a text or a number (meters existed back then)).
