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

Home » Public Forums » archive » TVRD'ing under windows
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: TVRD'ing under windows [message #15348 is a reply to message #15261] Tue, 11 May 1999 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
David Foster (foster@bial1.ucsd.edu) writes:

> I ran into this problem years ago under X-Windows (Sun OS and Solaris),
> and at that time it was a bug, in that even with backing store
> provided by IDL TVRD() could produce unexpected results if the window
> was obscured or iconified, especially if the draw widget was
> scrollable.
>
> I got around the problem by using DEVICE, COPY=[] to copy the window
> contents to a pixmap, and then TVRD() from that pixmap. Works quite
> well, at least under SunOS/Solaris.
> I've attached my SAFE_TVRD.PRO and SAFE_TVRD.DOC files.

Alas, even Safe_TVRD won't help with this problem, since
it has to do with how windows on 24-bit devices work. You
will have the same problem reading off a pixmap as you will
off the display window. What you *might* be able to do,
depending upon how "device-independently" you write your
graphics display code, is display your graphics in the
Z-graphics buffer. You can take a TVRD() from this
window and end up with a 2D array of index values, which
is what you might be expecting.

You can find more information about this problem here:

http://www.dfanning.com/tips/strange_tvrd.html

By the way, I'm told that there are actually graphics
display cards (e.g. a DEC Alpha with a video card 40T)
that store their data as BGR instead of RGB. On those
cards, you will have to switch things around to get
what you expect. Don't you love computers? Sigh...

On a happier note, I finally got some folks at RSI
listening to my complaints about having to set
Device, Decomposed=1 (or load color table 0) to get
a 24-bit image to display with the correct colors
on a PC in 24-bit color mode. No promises, but at
least they are listening. Stay tuned. :-)

In the meantime, you can use TVImage, which puts you
in the proper mode automatically (and switches you
back if you are running IDL 5.2, where the keywords
are available to do it).

http://www.dfanning.com/programs/tvimage.pro

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: IDL 5.0.2 with windows 98
Next Topic: Reclicing image volumes

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

Current Time: Wed Oct 08 19:36:49 PDT 2025

Total time taken to generate the page: 0.00373 seconds