WhiteIndex

We have encountered problems using the WhiteIndex call when running PTB on
PCs. This oneliner is meant to return the color specification that produces
white given the default CLUT under the current display mode. It does this by
obtaining the PixelSize and the platform and, in a switch statement, mapping
the appropriate setting.

We have encountered two problems (these apply both to version 2.5 and the
new 2.54 source).

First, the switch statement does not include 24 bit mode. Perhaps this is
not available on Macs, but it is supported by many PC video cards and the
machines in our lab use it. Calling WhiteIndex on a machine set in 24 bit
mode results in the error message
??? One or more output arguments not assigned during call to 'whiteindex'.

One useful enhancement would be for the switch statement in WhiteIndex to
have an "otherwise" clause that more gracefully informed the user how to
work around its deficiencies. Of course, it would also be nice if it
included an appropriate 24-bit value.

The second problem is that the value specified for 16 bit mode 31, produces
magenta, not white, at least on our machines.

Ted Wright
Ted,

Thanks for identifying those problems and reporting them.

I've scheduled work on that for the 20th and a link to your bug report
is listed under the entry for that date. The Psychtoolbox calendar is
here:
http://ical.mac.com/WebObjects/iCal.woa/wa/default?
u=allen_ingling&n=Psychtoolbox32OSX32Schedule.ics

It would help me to make sure that I have eradicated the problem if I
install a video card which supports 24-bit mode. I can probably find
a spare card around here which does, but in case not, what model card
are you using, in case I want to get the same thing ?

best,

Allen



On Mar 16, 2004, at 8:15 AM, Charles E. (Ted) Wright wrote:

> We have encountered problems using the WhiteIndex call when running
> PTB on
> PCs. This oneliner is meant to return the color specification that
> produces
> white given the default CLUT under the current display mode. It does
> this by
> obtaining the PixelSize and the platform and, in a switch statement,
> mapping
> the appropriate setting.
>
> We have encountered two problems (these apply both to version 2.5 and
> the
> new 2.54 source).
>
> First, the switch statement does not include 24 bit mode. Perhaps
> this is
> not available on Macs, but it is supported by many PC video cards and
> the
> machines in our lab use it. Calling WhiteIndex on a machine set in 24
> bit
> mode results in the error message
> ??? One or more output arguments not assigned during call to
> 'whiteindex'.
>
> One useful enhancement would be for the switch statement in WhiteIndex
> to
> have an "otherwise" clause that more gracefully informed the user how
> to
> work around its deficiencies. Of course, it would also be nice if it
> included an appropriate 24-bit value.
>
> The second problem is that the value specified for 16 bit mode 31,
> produces
> magenta, not white, at least on our machines.
>
> Ted Wright
>
>
>
> http://psychtoolbox.org
> POST a message to: psychtoolbox@yahoogroups.com
> UNSUBSCRIBE by sending a blank message to:
> psychtoolbox-unsubscribe@yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>