sriniv@cathedral.cerc.wvu.wvnet.edu (Srinivas Kankanahalli) (11/29/90)
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. If the cursor is taken to the other window, the image becomes active. We think it is due to sharing or non-sharing of colourmaps. Can somebody please help. -srini sriniv@cerc.wvu.wvnet.edu
dbrooks@penge.osf.org (David Brooks) (11/29/90)
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
etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) (11/29/90)
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. If the cursor is taken to the |> other window, the image becomes active. We think it is due to sharing |> or non-sharing of colourmaps. Can somebody please help. |> -srini |> sriniv@cerc.wvu.wvnet.edu You have a fundamental problem shared by everyone with 8-bit workstations. You can't do it all of the time. You can only approximate. It is not a problem with focus. Only one colormap can be installed at any given time (with most hardware. I believe the Silicon Graphics can have 16 at one time). You might try bringing up your X server with an 8-bit TrueColor Visual. This will give you very choppy images, but it will do it. If this is unstatisfactory, I can give you a program that addresses this very problem and will display very nice images that share the default colormap. -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bmc.tmc.edu (713) 798-3776