Path: utzoo!attcan!uunet!mcvax!hafro!krafla!raunvis!kjartan From: kjartan@raunvis.UUCP (Kjartan Pierre Emilsson Jardedlisfraedi) Newsgroups: comp.windows.x Subject: Allocating 256 color cells Keywords: color table, allocation of color cells Message-ID: <225@raunvis.UUCP> Date: 14 Jun 88 16:37:49 GMT Organization: Science Inst. Univ. of Iceland Lines: 28 Hi I am writing an application in X to be able to control and change the color table of a vt100 (X server) interactively whilst viewing a picture or running a graphic program. The application is mouse driven and independent of any process that might be running at the same time. The program works pretty well except for a little bug which has annoyed me a lot. The problem is that when I try to allocate more than 249 color cells the allocating routine returns pixel value 0 for all color cells. It is just as if the first 8 pixel values (0-7) were fixed as read-only color cells. I think that this same bug shines through the GKS system we are using (as it is written in X), but there it manifest itself in such a manner that trying to use pixel values higher than 245 results in an illegal color index error. Does anyone have any idea what is going on here, and if so how one should proceed to allocate 256 color cells ? Thanks in advance. ........................................................................... "If you don't like what your left hemisphere thinks, shoot if off." Kjartan Pierre Emilsson, Iceland. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~