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

Home » Public Forums » archive » Re: converting window into a image
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: converting window into a image [message #47016 is a reply to message #47015] Wed, 18 January 2006 10:39 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matt writes:

> O.k. everyone, I'm a huge fan of the tvread(). But I want to know is, is
> there a way to force white to actually be white when writing a png?
>
> When I start my idl session, I use Liam's excellent startup ideas for setting
> windowing and color.
>
> device, true=24
> window, /free, /pixmap, colors=-10
> wdelete, !d.window
> device, retain=2, decomposed=0,set_character_size=[10,12]
> device, get_visual_depth = depth
>
>
> So then say for example, I'm running these commands.
>
> x = indgen( 50 )
> y = sin( x )
> plot, x, y, BACKGROUND= fsc_color( 'white', 250 ), color= fsc_color( 'black', 251 )
> x = tvread(/png, FILENAME= "test", /NODIALOG,quality=100)
>
> When I examine the output png, the background is not white, but
> some combination of R:255, G: 251, B:255., and R:247, G:256, B:247, etc...
>
> It doesn't matter on the screen, but when I print out my plots, they come out
> with a green or yellow tint and against the white margins, they just look
> kinda yucky.
>
> Can anyone help? Did I miss that tutorial?

Humm. Weird.

I just typed those commands, opened the PNG file up in Photoshop
and the whites are as white as can be. The Info palette confirms
values of [255,255,255] as I run the cursor over the image.

I suspect the problem is here:

> device, true=24
> window, /free, /pixmap, colors=-10

What in God's name is that Window command doing there!?
(I know why it *used* to be there, but it is no longer
needed on 24-bit displays.)

What happens if you remove it?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
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
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: iTools Data Manager
Next Topic: Re: Linux Help Needed

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

Current Time: Fri Oct 17 13:43:52 PDT 2025

Total time taken to generate the page: 1.11959 seconds