Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!udel!rochester!rutgers!netnews.upenn.edu!msuinfo!arirang.cps.msu.edu!courtney From: courtney@arirang.cps.msu.edu (Jonathan Courtney) Newsgroups: comp.windows.open-look Subject: xview colormap segments Message-ID: <1991Apr1.195641.14615@msuinfo.cl.msu.edu> Date: 1 Apr 91 19:56:41 GMT Sender: news@msuinfo.cl.msu.edu Reply-To: courtney@arirang.cps.msu.edu (Jonathan Courtney) Organization: PRIP Lab, Comp. Sci. Dept., MSU Lines: 36 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