Re: FVWM: Reducing color use for pixmaps (home made solution)

From: Martin Kraemer <Martin.Kraemer_at_mch.sni.de>
Date: Fri, 15 Mar 1996 10:13:09 +0100 (MET)

Romano Giannetti wrote...
>
> Yes, but netscape do dithering (I think) and in big images it is
> perfect doing so. I tried reducing color in icons with netpbm, but in
> very little images, with strenght color contrast, results are, well,
> not so good.

I liked the way `xv' does the color reduction when it cannot allocate
all colors. I think that's an algorithm based on the number of color cells
which are still available for free programming; only in very rare cases
does it have to re-use color cells which have been allocated by a
different program.

> I tried reducing my whole iconset to 16 colors (the same 20) and it look
> quite good for almost all the icons. Almost :-). With 32 colors, if the
> subset is good, I think it will look good.

Congratulations, Romano:
I think your program was the by now very best approach to the problem. One
"only" needs the "most suitable" set of colors. (Maybe one should really
reduce all icon's color entries to 8 bit, or even 4 bit, by forcing the
color's low order nibble to 0, before one calls pixy?)

I tried it with a set of 32 colors, 16 of which are those thich Win95/Win3
uses in its icons. Here's my 32col.xpm file (even though I'm still not
completely satisfied with the results):

/* XPM */
static char * col32_xpm[] = {
"32 23 32 1",
" s none m none c none",
". c #000000",
"X c #202020",
"o c #404040",
"O c #808080",
"+ c #C0C0C0",
"_at_ c #FFFFFF",
"# c #0000FF",
"$ c #FF00FF",
"% c #FF0000",
"& c #FFC000",
"* c #FFFF00",
"= c #00FF00",
"- c #00FFFF",
"; c #0000C0",
": c #C000C0",
"> c #C00000",
", c #FF8000",
"< c #C0C000",
"1 c #00C000",
"2 c #00C0C0",
"3 c #000080",
"4 c #800080",
"5 c #800000",
"6 c #C08000",
"7 c #808000",
"8 c #008000",
"9 c #008080",
"A c #A0A0A0",
"I c #101010",
"Y c #606060",
"E c #E0E0E0",
" ...IIIXXXoooYYYOOOAAA+++EEE_at_@@ ",
" ...IIIXXXoooYYYOOOAAA+++EEE_at_@@ ",
" ...IIIXXXoooYYYOOOAAA+++EEE_at_@@ ",
" ...IIIXXXoooYYYOOOAAA+++EEE_at_@@ ",
" ...IIIXXXoooYYYOOOAAA+++EEE_at_@@ ",
" ",
"####$$$$%%%%&&&&****====----####",
"####$$$$%%%%&&&&****====----####",
"####$$$$%%%%&&&&****====----####",
"####$$$$%%%%&&&&****====----####",
"####$$$$%%%%&&&&****====----####",
" ",
";;;;::::>>>>,,,,<<<<11112222;;;;",
";;;;::::>>>>,,,,<<<<11112222;;;;",
";;;;::::>>>>,,,,<<<<11112222;;;;",
";;;;::::>>>>,,,,<<<<11112222;;;;",
";;;;::::>>>>,,,,<<<<11112222;;;;",
" ",
"33334444555566667777888899993333",
"33334444555566667777888899993333",
"33334444555566667777888899993333",
"33334444555566667777888899993333",
"33334444555566667777888899993333"};


Oh, yeah, Romano, you should really put your email address somewhere into
the sources. I didn't find it anywhere and had already dropped your
announcement...

    Martin
--
| S I E M E N S |   Martin.Kraemer_at_mch.sni.de   |       Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |   Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |    81730 Munich, Germany
~~~~~~~~~~~~~~~~ My opinions only, of course; pgp key available on request
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Fri Mar 15 1996 - 03:13:56 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:58 BST