Re: PyschToolbox: quick movie question

Hi Jean

Forwarded to the forum, its useful for others as well.

Leave the 'srcRect' parameter in Screen('DrawTexture') at its []
default. Set the dstRect parameter to the wanted size and location of
the screen area:

dstRect = CenterRect(ScaleRect(Screen('Rect', myMovieImageTexture),
3,3 ) , Screen('Rect', myWindow));

-> Scale by a factor of 3 in each direction, (re-)center the scaled
up rect in the window.
-> Obviously you'll need to define 'dstRect' only once with the first
movie frame (or hardcoded), as the size of video frames doesn't change.

--> 'DrawTexture' will resize and use bilinear filtering for resizing.

best,
-mario

On Jun 3, 2008, at 10:13 PM, Jean Vettel wrote:

>
> Hi,
>
> It's Jean from Mike Tarr's lab. I am playing movies in PsychToolbox,
> and I want to resize the movies during playback.
>
> I tried passing the values I wanted to resize to the display rect,
> but it
> just show the movie at its native size. (I also tried hacking it at
> the
> sourceRect stage to no avail). I was poking around the PsychDemos
> folder
> and couldn't find any example code to resize.
>
> Do you know of a solution to resize a Quicktime movie? or will I
> need to
> do this outside of my PsychToolbox script?
>
> I'd appreciate your keen insight if you have time.
>
> Thanks,
> Jean
>

*********************************************************************
Mario Kleiner
Max Planck Institute for Biological Cybernetics
Spemannstr. 38
72076 Tuebingen
Germany

e-mail: mario.kleiner@...
office: +49 (0)7071/601-1623
fax: +49 (0)7071/601-616
www: http://www.kyb.tuebingen.mpg.de/~kleinerm
*********************************************************************
Je weniger ich von etwas weiß, desto leichter fällt es mir,
bereitwillig darüber zu sprechen.