Re: SCREEN commands in Windows

Kenneth L. Grieve wrote:

> I'm trying to write "movies" for the NIH based electrophysiology
> software called Cortex - basically I'd like to "save" a Screen as a
> .tif file - any ideas? ...
>

Ken,

See Matlab's "imwrite" function.

You can use screen's 'GetImage' and 'GetClut' commands to copy a screen
and color info into matrices. If imwrite interprets values differently
than the screen commands do, then you can't pass those matrices directly
to imwrite, you will have to do some work on them first. You might, for
example, have to normalize the [0-255] range to [0-1]. See help on
imwrite to find out what it wants.

You will likely be better off using the Mac for now. I've had reports of
problems with 'GetClut' on the PC version, it does not yet work with
pixel depths > 8, and yellow gratings does not sound good.

A function which accepts two arguments, a pointer to a Psychtoolbox
window and a file name, and writes the image held by the window to a tiff
file of the specified name, would be generally useful. So if you end up
with something like that, you might want to post it to the Psychtoolbox
forum at http://groups.yahoo.com/group/psychtoolbox/messages/ . On the
other hand, maybe someone at the forum has something which would help
you, so I am copying this message there.


Allen



mjcssklg wrote:

> Hi Allen,
>
> I'm trying to write "movies" for the NIH based electrophysiology
> software called Cortex - basically I'd like to "save" a Screen as a
> .tif file - any ideas? I'm using Matlab 5 on a PC (although I have a
> Mac if required). I can get the images I want simply modifying your
> GratingDemo.m file (though strangely the image on this Dell
> 500/Win 98/nVidia card is a yellow grating? On My
> Dan166/Win98/Matrox mystique its perfecly normal!)
>
> many thanks,
>
> Ken Grieve
>
> ----------------------
> Dr. Kenneth L. Grieve,
> Behavioural Neuroscience Group,
> Department of Optometry and Neuroscience,
> UMIST,
> PO Box 88,
> Manchester M60 1QD
> UK
> ph 0161 200 3868 fax 0161 200 3887