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

Home » Public Forums » archive » Re: More Questions on 24 bit color
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: More Questions on 24 bit color [message #13331 is a reply to message #13330] Tue, 10 November 1998 00:00 Go to previous messageGo to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Kevin Ivory (Kevin.Ivory@linmpi.mpg.de) writes:

> David Fanning wrote:
>> snapshot = TVRD(True=1)
>> image2D = Color_Quan(snapshot, 1, r, g, b)
>> Write_Gif, 'neat.gif', image2D, r, g, b
>
> I've never really got tvrd() to work on Linux XFree86 with 24 bpp.
> I figured it was the same bug that doesn't let me grab a window
> correctly with xv or gimp. That why I was quite happy to see David
> post a few lines that should work. Alas, I get some kind of an error:
>
> IDL> snapshot = TVRD(True=1)
> IDL> help,snapshot
> SNAPSHOT BYTE = Array[3, 651, 921]
> IDL> image2D = Color_Quan(snapshot, 1, r, g, b)
> % COLOR_QUAN: Value of number of colors is out of allowed range.
> % Execution halted at: $MAIN$
>
> The message doesn't help me much. Any ideas?

Oh, sorry, Kevin. I think I am using the IDL 5.2 Color_Quan,
which has been fixed. Earlier versions did not work on
24-bit machines! While you are waiting for the official
new version you can make yours work by setting the Colors
keyword to 256.

image2D = Color_Quan(snapshot, 1, r, g, b, Colors=256)

Cheers,

David

----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll-Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/

Note: A copy of this article was e-mailed to the original poster.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: GUI Builder limited to Windows platform (LONG)
Next Topic: Re: using mpfit

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

Current Time: Sun Oct 12 09:38:47 PDT 2025

Total time taken to generate the page: 1.28107 seconds