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

Home » Public Forums » archive » Re: Color problem on Mac, not Windows - something about 239?
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: Color problem on Mac, not Windows - something about 239? [message #17673] Wed, 03 November 1999 00:00
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
David Hirsch, dhirsch.IHATESPAM@mail.utexas.edu writes:

[problems with colour tables on MacOS]

I get the same thing on a PPC9600/OS8.6/IDL5.2.1. I don't know
where it is coming from, but it looks like the Mac window manager
isn't giving IDL what it wants. There's a similar problem in direct
graphics where the first and last items of a 256-element colour table
are always black and white on screen, whatever IDL might think they
are internally. The online help for IDLgrWindow does warn that
256-colour windows might behave strangely.

The solution to your problem is to make the window an RGB one
(color_model=0) and associate the palette with the IDLgrImage.
Conceptually this makes more sense anyway - and it will allow you to
add annotations to images in colours no contained in the image's
colour table, useful for colour overlays on B+W images. In your
example program just replace:

myWindow->SetPropery, palette=myPalette

with:

myImage -> SetProperty, palette=myPalette

everywhere it occurs and everything works fine. (You'll also have
to move the creation of myImage so it occurs before the palette
allocation)


Struan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MPEG2 Reader/Decoder
Next Topic: Re: point_lun question, Solution

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

Current Time: Wed Oct 08 15:27:29 PDT 2025

Total time taken to generate the page: 0.00451 seconds