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
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