Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!paperboy!penge!dbrooks From: dbrooks@penge.osf.org (David Brooks) Newsgroups: comp.windows.x Subject: Re: How to display two or more xloadimage windows Keywords: red orange yellow etc Message-ID: <16658@paperboy.OSF.ORG> Date: 29 Nov 90 05:07:14 GMT References: <1033@babcock.cerc.wvu.wvnet.edu> Sender: news@OSF.ORG Reply-To: dbrooks@osf.org (David Brooks) Organization: Open Software Foundation Lines: 31 In article <1033@babcock.cerc.wvu.wvnet.edu> sriniv@cathedral.cerc.wvu.wvnet.edu (Srinivas Kankanahalli) writes: >Hi > Can someone suggest a way to display two or more colour images in >different windows using xloadimage?. The problem we are facing is >that there is only one window in focus. As soon as the cursor is moved >out of the window, the image disappears. It's my guess that it doesn't literally disappear. If it does, you have a serious problem. It probably "goes technicolor", meaning it looks like it was splattered by a random collection of paintbrushes. This is caused by xloadimage (a) trying to use the default colormap, which only has n (usually <256) entries free (b) noticing the picture needs >n distinct colors (c) allocating a private colormap and using that (d) asking the window manager to load the right colormap at the right time (e) return to (a) for the second picture. Do this: make a guess at how many colormap entries you have free in your default map. 200 is a good round number. Then: xloadimage -colors 100 image1 (ok so far?) xloadimage -colors 100 image2 (hold your breath) If you still get technicolor, try 90, 80, and so on until (a) it works or (b) the resulting color scheme is too far removed from the original to be interesting. (a) happens nearly all the time. -- David Brooks dbrooks@osf.org Systems Engineering, OSF uunet!osf.org!dbrooks "No, I didn't say I wanted a Bud light!!!" -- Oedipus