Re: XForms: image support and colormaps

Steve Lamont (spl@szechuan.ucsd.edu)
Tue, 27 Apr 99 07:41:39 PDT

# To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> If I try to display GRAY16 image (e.g. read from a 16-bit FITS file)
> in a PseudoColor visual (e.g. in a canvas window), what kind
> of colormap is used? Does the display routine change the colormap?
> Should the user prepare it manually? Can the user control how
> many grey levels are used?

Generally a PseudoColor Visual will give you an 8 bit lookup table.

The Canvas object makes a copy of the Colormap used by the parent
form. You can get that colormap with the function
fl_get_canvas_colormap() and manipulate it with the standard Xlib
functions.

You will have to quantize your 16-bit image down to 8 bits or fewer
(since you will need to share the colormap with the rest of the
application).

The next release of XForms (now in limited Beta, I believe) will have
image support that will eliminate a lot of this nonsense. I'm trying
to find the time to finish integrating my quantization code into it --
Real Soon Now. :-/

spl

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/