[comp.windows.x] A few questions on colormaps

bmc@MYCROFT.MAYO.EDU (07/20/89)

I am currently involved in developing an application that will manipulate
grayscale and color images and have run into a few problems in defining and
manipulating colormaps. I would appreciate any and all code segments, hints and
suggestions concerning the following questions. Forgive me if this subject has
been discussed before.

1) Is there a way to create and install a 256 entry grayscale colormap that
   will work across all(most) of the visual classes? The code I wrote works
   on Sun 3s and 4s but not on DECstations or SGI 4Ds (these machines have
   different visual classes then the Suns).

2) What is the fastest way to change a single entry in an existing (install)
   colormap? I am looking for "immediate" change to the image in the window.
   Again, this needs to be able to work across different visual classes.

3) In your experience, what is the fastest way to manage colormaps? Should
   each window have its own colormap, or should only the parent window have
   an installed (set?) colormap and let those effects trickle through to
   its children. I am looking for methods that are memory & cpu efficient.

Thank you.

--Bruce

-------------------------------------------------------------------
Bruce M. Cameron                            bmc@mayo.edu
Medical Sciences  1-14                      (507) 284-3288
Mayo Foundation                             WD9CKW
Rochester, MN  55905

We seek a world free of war and the threat of war. We seek a society
with equity and justice for all. We seek a community where every
person's potential may be fulfilled. We seek an earth restored.
                                                          -----FCNL
___________________________________________________________________