Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!watmath!focsys!larry From: larry@focsys.UUCP (Larry Williamson) Newsgroups: comp.windows.x Subject: How to define a default colour map at initialization? Message-ID: <505@focsys.UUCP> Date: 29 Jun 89 21:15:17 GMT Reply-To: larry@focsys.UUCP (Larry Williamson) Organization: Focus Automation Systems, Waterloo, Ontario. Lines: 33 When xinit starts X and xterm, a default colour map is set up that defines black as pixel 0, white as pixel 1 and (in our case) differing shades of red as the next 14 pixels (this is a 4 plane system, about to be upgraded to 8 :-). I would like X to startup with a different colour map. Specifically, I want each pixel from 0 - n to be a shade of gray that ranges from black at 0 to white at n. It is easy to do this once X is started, my application changes the colour map. The problem is that all processes that started before I change the colour map (xterm, uwm, etc) get screwed up. The pixel that they were using for white (1) is now, very, very dark. So, all text windows suddenly go black. All processes that start after I change the colour map, look fine. When they ask for a white pixel value, they get the new value. (uwm is still a bugger to work with though, because all the pop up windows it creates are black!). I don't want to leave the pixel value 1 as white because I will be displaying many large (>300K byte) gray scale images. It will not be practical to run though every image and rescale all the pixel values. Of course it is entirely possible that I have approached this problem from the wrong direction, and I am doing everything wrong. I have not yet come to grips with the 'correct X philosophy' in all things. In case it matters, and I suspect it does, I'm using X11R2. thanks, -larry-- Larry Williamson -- Focus Systems -- Waterloo, Ontario watmath!focsys!larry (519) 746-4918