Bug in Screen('OpenWindow') (Windows Version 2.54) Color spec. swapped.

Hi,

We run the latest Windows Psychtoolbox (Version 2.54) on Windows-XP
Professional 2002, Service Pack 1,
using a GeForce-4 Ti 4200 at a color depth of 32 Bits.

If we do a window = SCREEN(screenNumber,'OpenWindow',[255 0 0]);

then we don't get a Red background, as [255 0 0] requests, but a Blue one.
So the definition of background colors is not [Red Green Blue] as expected,
but [Blue Green Red]. At the same time, if we specify RGB colors e.g. in
Screen('DrawText'...,
everything works as expected, aka order is [Red Green Blue].

I suppose this is a bug. Has anybody else encountered the same problem?

Best,
hannah
Hannah,

I've tried PTB 2.5.4 with both XP Pro SP1 and Win2K SP4, and I can
tell you that it runs better overall; faster, with less bugs, and more
reliability under Win2K. If you have access to a copy of Win2K I
think you'd be better off with it than with XP.

Paul Thiem
UC Santa Cruz

--- In psychtoolbox@yahoogroups.com, "Hannah" <hannah.helbig@t...> wrote:
> Hi,
>
> We run the latest Windows Psychtoolbox (Version 2.54) on Windows-XP
> Professional 2002, Service Pack 1,
> using a GeForce-4 Ti 4200 at a color depth of 32 Bits.
>
> If we do a window = SCREEN(screenNumber,'OpenWindow',[255 0 0]);
>
> then we don't get a Red background, as [255 0 0] requests, but a
Blue one.
> So the definition of background colors is not [Red Green Blue] as
expected,
> but [Blue Green Red]. At the same time, if we specify RGB colors e.g. in
> Screen('DrawText'...,
> everything works as expected, aka order is [Red Green Blue].
>
> I suppose this is a bug. Has anybody else encountered the same problem?
>
> Best,
> hannah
Hannah,

The Win Psychtoolbox should detect the pixel format of the video
surface and reorder the RGB components of arguments accordingly. Looks
like its failing to do that correctly for your model of video card.

I've added your report to the list if Windows bugs to deal with on the
20th. Might be bumped back the 27th if I decide to order one of those
GeForce-4 Ti 4200 cards for debugging purposes.

best,

Allen

ps. The Psychtoolbox schedule is here:
http://ical.mac.com/WebObjects/iCal.woa/wa/default?
u=allen_ingling&n=Psychtoolbox32OSX32Schedule.ics

A link to your message reporting the bug on the forum appears under
that calendar date.






On Mar 18, 2004, at 11:57 AM, Hannah wrote:

> Hi,
>
> We run the latest Windows Psychtoolbox (Version 2.54) on Windows-XP
> Professional 2002, Service Pack 1,
> using a GeForce-4 Ti 4200 at a color depth of 32 Bits.
>
> If we do a window = SCREEN(screenNumber,'OpenWindow',[255 0 0]);
>
> then we don't get a Red background, as [255 0 0] requests, but a Blue
> one.
> So the definition of background colors is not [Red Green Blue] as
> expected,
> but [Blue Green Red]. At the same time, if we specify RGB colors e.g.
> in
> Screen('DrawText'...,
> everything works as expected, aka order is [Red Green Blue].
>
> I suppose this is a bug. Has anybody else encountered the same problem?
>
> Best,
> hannah
>
>
>
>
> http://psychtoolbox.org
> POST a message to: psychtoolbox@yahoogroups.com
> UNSUBSCRIBE by sending a blank message to:
> psychtoolbox-unsubscribe@yahoogroups.com
> Yahoo! Groups Links
>
>
>
>
>