[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TVRD'ing under windows
- Subject: Re: TVRD'ing under windows
- From: davidf(at)dfanning.com (David Fanning)
- Date: Tue, 11 May 1999 19:03:00 -0600
- Newsgroups: comp.lang.idl-pvwave
- Organization: Fanning Software Consulting
- References: <firstname.lastname@example.org> <3738CDA5.email@example.com>
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:14706
David Foster (firstname.lastname@example.org) 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
> 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:
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).
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: email@example.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155