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

Home » Public Forums » archive » 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 #13505 is a reply to message #13336] Sat, 14 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:

> Reinhold Schaaf (schaaf@astro.uni-bonn.de) writes:
>> But, although the plot in the IDL-window is white (I mean: *really*
>> white), the background color in the gif-image is not *really* white,
>> but instead a light grey.
>
> David Fanning wrote:
>> Reinhold, I'm sorry to say that this problem cannot be laid
>> on IDL's doorstep. This is a Windows problem. I just ran
>
> Well, it is not a problem of MS Windows - Linux shows the same effect.
> I think COLOR_QUAN gets something mixed up. Try this:

Well, you may be right, Kevin.

Try this program:

PRO TEST
x = FINDGEN(101)
y = SIN(x/10)

red = [0, 1, 1, 0]
green = [0, 1, 0, 0]
blue = [0, 1, 1, 0]
TVLCT, 255*red, 255*green, 255*blue
TVLCT, r, g, b, /Get
Print, 'Original Color Table Max Values: ', Max(r), Max(g), Max(b)
DEVICE, DECOMPOSED=0

PLOT, x, y, BACKGROUND=1, COLOR=2
snapshot = TVRD(True=1)
image2D = COLOR_QUAN(snapshot, 1, r, g, b, Colors=4)
Print, 'Colors = 3 Test: ', Max(r), Max(g), Max(b)
WRITE_GIF, 'test_one.gif', image2D, r, g, b

image2D = COLOR_QUAN(snapshot, 1, r, g, b, Cube=2)
Print, 'Cube = 2 Test: ', Max(r), Max(g), Max(b)
WRITE_GIF, 'test_two.gif', image2D, r, g, b
END

The results I get are these:

IDL> Test
Original Color Table Max Values: 255 255 255
Colors = 3 Test: 248 248 248
Cube = 2 Test: 255 255 255

Moreover, the test_two.gif file shows up with a VERY
white background in Microsoft Word! :-)

I'll ask RSI and see if we can get some kind of
explanation for this.

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/
----------------------------------------------------------
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/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cylindrical map projection screwed up?
Next Topic: Where should I put a preferences file?

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

Current Time: Wed Oct 08 19:17:22 PDT 2025

Total time taken to generate the page: 0.00484 seconds