Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!bcm!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: Re: 256-color images in X Message-ID: <3164@gazette.bcm.tmc.edu> Date: 12 Dec 90 16:28:22 GMT References: <114778@philabs.Philips.Com> Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Organization: Baylor College of Medicine, Houston, Tx Lines: 19 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu In article <114778@philabs.Philips.Com>, bob@gimli.Philips.Com (Robert A. Cohen) writes: |> Is there any way in X11R4 to view an image that has |> 256 different colors (or 256 gray levels) on a color |> SUN (8 bits) when using X? |> |> Thanks in advance, |> Bob Cohen Well, first create a colormap (I am assuming a PseudoColor Visual). Use XStoreColors to set the values of all 256 colors in the colormap. Now set the colormap using (XSetColormap) of your window to the created colormap. Write out your image. -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bcm.tmc.edu (713) 798-3776