Docs @ Psychtoolbox Wiki : SetResolution

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

SetResolution

PsychtoolboxPsychOneliners

oldRes=SetResolution(screenNumber,width,height,[hz],[pixelSize])
oldRes=SetResolution(screenNumber,res)

Set the resolution of the screen. This is intended to be used in
programs that run psychophysical experiments, so SetResolution is
strict. It issues a fatal error unless it can provide exactly the
resolution you specified. (For lenience, look at NearestResolution.)
"screenNumber" is the screen number.
"width" and "height" are the desired dimensions in pixels.
"hz" is the desired refresh rate (default is current frame rate).
"pixelSize" 8, 16, 24, or 32 bits and defaults to current pixelSize.
Returns the current resolution as "oldRes".

oldRes=SetResolution(0,1024,768,75);
w=Screen(0,'OpenWindow');
Screen(w,'PutImage',image);
Screen(w,'Close');
SetResolution(0, oldRes);

To display a list of available resolutions, try ResolutionTest. Also see
NearestResolution, ResolutionTest, and Screen('Resolution')
and Screen('Resolutions').

NOTE: Apple has all the new LCD screens return a frame rate of 0, so
we treat that value as a special case. A request for "hz" of NaN will
match only with a frame rate of 0.

Originally written by Sabina Wolfson.




Path   Retrieve current version of SetResolution.m from berliOS: beta | view WebSVN changelog of trunk branch
Psychtoolbox/PsychOneliners/SetResolution.m


Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.0945 seconds