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

Home » Public Forums » archive » Re: Do sav files have only 256 colors
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Do sav files have only 256 colors [message #14978] Wed, 14 April 1999 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Robert King (kingrj2@bp.com) writes:

> I had much trouble with getting colours (ie not greyscale) to work
> correctly in runtime versions of .sav files but [thanks to DWF :-)], I
> found that if you include "Device Decomposed=0" [oh no, not again! :-) ]
> at the beginning of your program and then create a .sav file, you can get
> colours to work correctly on any screen mode.

God bless you, Sir.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Do sav files have only 256 colors [message #14981 is a reply to message #14978] Wed, 14 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
R.Bauer (R.Bauer@fz-juelich.de) writes:

> this is a small example.
> create a runtime sav file 'cbar_true.sav' in true color mode of your graphics
> card
> Then execute the file. You' ll see only greyscaled colors.
> If you change to 8bit color mode and you execute again you see a red to white
> colorsystem
>
>
> pro cbar_true
> loadct,3
> cbar
> wait,20
> end

I modified your program slightly, because I don't have the CBar
program. And, of course, I added Device, Decomposed=0 because
without it you will NEVER get colors anywhere (see posting by
our newest member, S. Daniel Kwak). But my program looks like
this:

pro cbar_true
device, decomposed=0
loadct,3
colorbar
wait, 20
end

And it ran *perfectly* on a Windows NT machine set in 24-bit
mode.

Are you sure you created the save file properly?

IDL> .Compile cbar_true
IDL> Resolve_All
IDL> Save, /Routines, File='cbar_true.sav'

If you forget the Resolve_All command, of course, then you
will never find the LOADCT command and that would cause
colors to be gray-scale.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Do sav files have only 256 colors [message #14983 is a reply to message #14978] Wed, 14 April 1999 00:00 Go to previous message
Robert King is currently offline  Robert King
Messages: 9
Registered: March 1999
Junior Member
R.Bauer <R.Bauer@fz-juelich.de> wrote :

> I found on NT 40 created sav files with graphics output on screen won't
> work with more than 256 colors.

> this is a small example.
> create a runtime sav file 'cbar_true.sav' in true color mode of your
graphics
> card
> Then execute the file. You' ll see only greyscaled colors.
> If you change to 8bit color mode and you execute again you see a red to
white
> colorsystem
>

Hi,

I'm quite new to IDL so forgive me if I've got the point to the question
wrong..

I had much trouble with getting colours (ie not greyscale) to work
correctly in runtime versions of .sav files but [thanks to DWF :-)], I
found that if you include "Device Decomposed=0" [oh no, not again! :-) ]
at the beginning of your program and then create a .sav file, you can get
colours to work correctly on any screen mode.

I hope that this helps,

Robert
Re: Do sav files have only 256 colors [message #14985 is a reply to message #14978] Wed, 14 April 1999 00:00 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
David Fanning wrote:

> R.Bauer (R.Bauer@fz-juelich.de) writes:
>
>> I found on NT 40 created sav files with graphics output on screen won't
>> work with
>> more than 256 colors.
>
> Uh, you better explain this a little more. I'm dubious. :-)
>
> Cheers,
>
> David
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155

You are right,

this is a small example.
create a runtime sav file 'cbar_true.sav' in true color mode of your graphics
card
Then execute the file. You' ll see only greyscaled colors.
If you change to 8bit color mode and you execute again you see a red to white
colorsystem


pro cbar_true
loadct,3
cbar
wait,20
end

R.Bauer
Re: Do sav files have only 256 colors [message #14995 is a reply to message #14978] Tue, 13 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
R.Bauer (R.Bauer@fz-juelich.de) writes:

> I found on NT 40 created sav files with graphics output on screen won't
> work with
> more than 256 colors.

Uh, you better explain this a little more. I'm dubious. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: NLEVELS doesn't necessarily mean NLEVELS
Next Topic: problem with Poly_norm

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

Current Time: Wed Oct 08 18:56:11 PDT 2025

Total time taken to generate the page: 0.00568 seconds