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

20020725: GEMPAK 16/24 bit color modifications



Art,

I've made a little progress in getting your modifications to work
on my machines here.

Some problems I had were:

1) the MAXCOLORDATA definition in xwcmn.h is set to 512.

   In ntl/colr.c colr_init(), the number of bytes being generated
   in the xcsdat call for my number of colors (33 Graph, 95 Sat,
   20 rad, 2 fax) was 620....so memory was getting clobbered. I changed
   MAXCOLORDATA to 2048 (4x previous) in my distribution.

2) also in ntl/colr.c, you had:

   unsigned int   sendcolr[MAXCOLORDATA],*dptr;

   this created problems for me when extracting the information
   back out of the shared color map since the expected size in
   xcsdat.c and xgbank.c (through call to xgsdat.c) of
   the data is unsigned char. The result was getting
   garbage off by 4xbyte in the shared color map in xgbank.

   I changed this to

    unsigned char   sendcolr[MAXCOLORDATA],*dptr;


At this point I am able to launch ntl and nsat on a 24 bit display
(without the above changes, I could launch nsat only if ntl wasn't running).

Steve Chiswell
Unidata User Support