[comp.windows.x] 256-color images in X

bob@gimli.Philips.Com (Robert A. Cohen) (12/12/90)

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

ea08+@andrew.cmu.edu (Eric A. Anderson) (12/12/90)

This sort of depends on the type of image.  However, look into
xloadimage.
available on expo.lcs.mit.edu
          -Eric
*********************************************************
"My life is full of additional complications spinning around until
 it makes my head snap off."
           -Unc. Known.
"You are very smart, now shut up."
           -In "The Princess Bride"
*********************************************************

etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) (12/13/90)

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