Re: Over 256 colors ??? [message #6533] |
Mon, 08 July 1996 00:00 |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
john@top.utwente.nl (TOP member) wrote:
>
> I have a second question. When I use the function TVRD() the result is an
> array with a resolution less than 256, which I would expect. Does anyone know
> a solution for this?
As stated in the manual, the TVRD() function returns the entire
contents of the current graphics window if no parameters are
provided. You can use the REBIN(), CONGRID() or EXPAND() routines
to enlarge the array if desired.
You can use
array = tvrd( x0, y0, nx, ny )
to read the contents of the graphics window starting at (x0,y0)
(the lower-left corner); nx and ny specify the size of the
rectangle in columns and rows.
Hope this helps.
Dave Foster
foster@bial1.ucsd.edu
|
|
|
Re: Over 256 colors ??? [message #6535 is a reply to message #6533] |
Mon, 08 July 1996 00:00  |
hahn
Messages: 108 Registered: November 1993
|
Senior Member |
|
|
john@top.utwente.nl (TOP member) wrote:
> Hi,
> I have this little problem with my windows 95 screen settings in combination
> with IDL. When I set my screen driver to more than 256 colors IDL does not
> seem to update the colors. Using XLOADCT for example does not change the
> apperance of an image until a new 'TV' command is entered. Also the default
> color of plot axis is changes to yellow or red.Probably IDL
> supports only 256 colors, but is there a way to circumvent this, so I can set
> my screendriver to a better resolution?
If I'm not mistaken IDL supports only 256 colors using a look up table and
16 Meg colors in true color mode (RGB). The MS Windows version has even
less than 256 colors because 20 of them are reserved by MS Windows. So
you can only define 236 colors.
If you graphics card supports 64k colors you have bad luck. If you need more
than 236 colors you must use true color and call tv with RGB data. There are
two ways to do that. True color mode requires 24 bits per pixel display memory
on your graphics card. Thus for 1280x1024 pixels you need 4 MB graphics ram.
> I have a second question. When I use the function TVRD() the result is an
> array with a resolution less than 256, which I would expect. Does anyone know
> a solution for this?
TVRD returns the contents of the specified rectangle of the screen or the
Z buffer. The rectangle defaults to the entier windows. If you use true
color mode you can select how TVRD returns the RGB data: pixel-
interleaved, line-interleaved or image-interleaved (channel by channel).
As you use TV with look up tables under MS Windows your look up table
is only 236 entries in size, thus you get less than 256 distinguishable
colors.
> John van Noort
> John@top.tn.utwente.nl
Norbert Hahn
|
|
|