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

Home » Public Forums » archive » Re: how can I preserve colours when reading pixels with tvrd function
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: how can I preserve colours when reading pixels with tvrd function [message #61846] Fri, 08 August 2008 03:49 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Aug 7, 7:55 am, David Fanning <n...@dfanning.com> wrote:
> bam writes:
>> I am using tvrd to capture the contents of an idl direct graphics
>> window [idl code: im=tvrd(0,0,500,500) ], on which I have a
>> combination of graphics, including plotted lines, xyouts text and a
>> background display of a byte array with a colortable. the output of
>> tvrd is a grayscale image that has lost all the colors in my original
>> window...
>> so how can i preserve the contents of my window and perhaps even save
>> it as a gif, without distorting the colors of my colortable?
>
> The short answer? Use TVREAD instead:
>
>    IDL> void = TVRead(/GIF)
>
> You can find TVRead here:
>
>   http://www.dfanning.com/programs/tvread.pro
>
> You can find the long answer inside the TVREAD code. :-)
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")

...or you could pass the result of TVRD through TRUEIFY:

http://web.astroconst.org/jbiu/jbiu-doc/plot/trueify.html

-Jeremy.
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Price of ION
Next Topic: Provinding files for VM-Application

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

Current Time: Fri Oct 10 06:23:16 PDT 2025

Total time taken to generate the page: 1.51786 seconds