comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » color mapping question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: color mapping question [message #6810 is a reply to message #6806] Thu, 29 August 1996 00:00 Go to previous messageGo to previous message
Christian Soeller is currently offline  Christian Soeller
Messages: 46
Registered: August 1996
Member
gennari@universe.Hawaii.edu (Scott Gennari) writes:

> I have a 256 color grayscale image and i'd like to overlay a
> coastline with some color (red). How would I strech the grayscale
> data values to fit 0-254 and reserve value 255 for a certain rgb
> color? I'm Not having much luck with STRETCH,0,254 and then assigning
> a rgb color to 255.

Even on a 256 color display IDL will in general only have a subset of all
those colors as a few are normally already allocated by other applications.
The actual number of colors available to IDl can be found in the sys var
!D.TABLE_SIZE. So you might try to scale your data to 0...!D.TABLE_SIZE-2
and assign the color number !D.TABLE_SIZE-1 to red (colors 0...!D.TABLE_SIZE-2
set to shades of grey from 0 to 255). You get the idea. See also documentation
for the TVSCL procedure.

Hope this helps,

Christian

------------------------------------------------------------ --------
Christian Soeller mailto: csoelle@sghms.ac.uk
St. Georges Hospital Medical School Dept. of Pharmacology
Cranmer Terrace London SW17 0RE
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Color Bars
Next Topic: IDL: TIFF functions

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:18:44 PDT 2025

Total time taken to generate the page: 0.00457 seconds