courtney@arirang.cps.msu.edu (Jonathan Courtney) (04/02/91)
I'm having some problems getting colormap segments as described in Chapter 20, XView Programming Manual, to work. Perhaps someone could help? My code for creating the cms is as such: =============================== Xv_singlecolor colors[256]; /* Grey scale */ for (i=0; i<256; i++) colors[i].red = colors[i].green = colors[i].blue = i; cms = (Cms) xv_create(NULL, CMS, CMS_SIZE, 256, CMS_COLORS, colors, CMS_COLOR_COUNT, 256, CMS_TYPE, XV_STATIC_CMS, CMS_NAME, "my_cms", NULL); ============================== Then I use the cms with a server image that is simply a ramp from 0-255. Unfortunately, it seems as if I can only allocate about the first 128 colors, because the last half of my ramp is all white. Using CMS_TYPE set to XV_DYNAMIC_CMS gives similar results. Can't one create a cms with more than 128 colors? Do I need to fall back on Xlib colormap allocation instead? I am running OW 2.0 on a sparcstation 2 . Any help would be greatly appreciated. Jon Courtney