Re: TVRD, Decomposed = ? and 24bit display [message #30258 is a reply to message #30257] |
Fri, 12 April 2002 04:10  |
maarten
Messages: 30 Registered: April 2002
|
Member |
|
|
Hi again,
actually I "solved" the problem after a few more desperat tries and
some more reading on Fannings excellent tricks-pages.
First I put Device, Decomposed = 0, to get good looking plots in the
window.
But right before the TVRD command I put Device, Decomposed = 1, to get it to
work.
In comp.lang.idl-pvwave, you wrote:
> Hi all,
>
> I'm new to this newsgroup, but been working with IDL for a while.
>
<CUT>
>
> Grateful for any help!
> M�rten
>
> An example code looks something like
corrected code will look
> ;--------------------CODE----------------------------
> Device, Decomposed = 0
>
>
> ; Create a "split" colortable
> ncolors = 2.^8
> LoadCT,0, NCOLORS=ncolors/2,BOTTOM=0 ;BW colorscale
> LoadCT,5, NCOLORS=ncolors/2,BOTTOM=ncolors/2 ;Colorscale
>
> ColorData = ...... ;Array of data
> ImageData = ...... ;Array contaning BW image
>
> ; Scale data so that it fits into the two different parts of the colortable
> ColorData = BYTSCL(ColorData,TOP=ncolors/2.-1)+BYTE(ncolors/2.)
> ImageData = BYTSCL(ImageData,TOP=ncolors/2.-1)
>
> ; Display the data
> CONTOUR, ColorData,/CELL_FILL, C_COLORS=INDGEN(25)*5+ncolors/2.,$
> .... ;+Alot of positioning commands'
> TV, ImageData, .... ;+ Alot of positioning commands
>
> ; Save window to file
> DEVICE, Decomposed = 1
> screendump = TVRD(True=1)
> WRITE_PNG,'filame.png',screendump
> ;------------------END CODE--------------------------------
>
>
/M�rten Blixt <Marten.Blixt@phys.uit.no>
<http://www.phys.uit.no/~maarten>
tel: +47 77 64 51 59
fax: +47 77 64 55 80
|
|
|