[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

19990826: Color Allocation



As mentioned, 
Gempak uses requires the default visual to be pseudocolor. You can
check this by using the X program "xdpyinfo" and seeing that
the default visual id is listed as pseudo color.

You can ensure that the Gempak color map is allocated and shared amongst
the Gempak programs and GUIs by launching "ntl &"  before you try to
launch any other color intensive programs.

Ntl will place a tool launcher on your screen and allocate the color map,
or report a failure if you do not have enough colors available. By
default, ntl will try to allocate 128 satellite colors, 33 gempak graphics
colors and 16 radar colors = 177 total colors. If you have fewer
than 177 colors available, then a message to how many colors are available
will printed out by ntl. If your default visual is not 8 bit, then you
will receive a NCALOC -46 message.

If you want to use fewer colors in Gempak- for example if you think 64
shades of gray is good enough for a satellite image instead of 128,
launch ntl with the command line option like "ntl -s 64 &", which will
reserve 64 colors for satellite images. Here is the ntl usage message:

         Usage: ntl [-s N] [-r N] [-v] [-h]
                 -s number of satellite colors
                 -r number of radar colors
                 -v verbose mode
                 -h print this usage

Once you launch ntl on your desktop, you can launch your other
applications like web browsers without conflict. Once the Gempak
shared color map is installed, any Gempak program will access that
table regardless of whether it is launched from the button bar, or
from a command line invocation.

Also, if you are using netscape, you can use a private color map for that
application with "netscape -install" to avoid other conflicts as well.

Steve Chiswell
Unidata User Support

On Thu, 26 Aug 1999, Stonie R. Cooper wrote:

> Dr. Koermer,
> 
> GEMPAK and the rest of the N-AWIPS distro are based on "psuedo color" color
> allocation; this is done as GEMPAK uses private color maps to make for fast
> layering, looping, contouring, etc.
> 
> Although the resolution of the X server isn't _directly_ tied to whether you
> can use psuedo color, direct color, or true color, it does play a role in that
> the defaults for the various X servers differ.  The default visual for an 
> 8-bit
> X server is usually psuedo color (what you need for GEMPAK); 16-bit usually
> defaults to direct color, and 24-bit defaults to true color.
> 
> Supposedly, you should be able to set the color allocation - depending
> on your OS, of course, so that you can use 16-bit with psuedo color.  We use
> Linux, and the NASA/NCEP (non-Unidata) distribution of GEMPAK where we had to
> port it, but it should basically be the same problem.  In any case, I have yet
> to get 16-bit color, with the default changed to psuedo color, to work.
> 
> The only way we found around it - set the X server to 8-bit color, and don't
> run any other X apps while you are trying to run GEMPAK.  For our GEMPAK, we 
> are
> using Linux 2.0.37, and KDE 1.1 WM.  KDE and GEMPAK seem to get along just 
> fine,
> as long as I don't try to bring up Netscape or KMail, etc.
> 
> Hope that helps.
> --
> Stonie R. Cooper,
> Science Officer
> Planetary Data, Incorporated
> Marietta, Georgia  30066
> address@hidden
> www.planetarydata.com
> 
> On Thu, 26 Aug 1999, you wrote:
> >Hello,
> >
> >We are relatively new in using NWX and GARP and want to expand our use
> >of these packages, but a nagging problem consists on color allocation or
> >lack thereof. I have only one machine that seems to be able to allocate
> >sufficient colors, even though I have other machines with better
> >graphics cards.
> >
> >We are successfully running it on FreeBSD Unix-configured Pentium 233
> >MMX PC with 8MB of video RAM. However, I can't get it to run because of
> >color allocation on a PIII 500MHz machine with 16 MB of video ram. They
> >are at at the identical levels of FreeBSD, XFree86, and both are using
> >the same KDE window manager. Both are set to 24-bit color.
> >
> >Does anyone have any suggestions? Is there anyway that GEMPAK can be set
> >to use a local color allocation table?  It certainly seems like its a
> >color hog and it really doesn't need very many colors. 
> >
> >                             Jim
> >-- 
> >James P. Koermer             E-Mail: address@hidden
> >Professor of Meteorology     Office Phone: (603)535-2325
> >Natural Science Department   Office Fax: (603)535-2723
> >Plymouth State College       WWW: http://vortex.plymouth.edu/
> >Plymouth, NH 03264
> 
>