findPicLoc.m: Where o' where should my image go?

To display an image in a particular location in PsychToolBox, you will need to specify the 4 edges of the image in x- and y-pixel coordinates, in the order [left, top, right, bottom]. Human beings don't tend to think in pixel coordinates (at least I don't!) so I've found it helpful to write a function where I can say I want an image at some relative location on the screen (e.g., 70% to the left), displayed at some relative size (e.g., 40% of the screen size) and this function will do all the hard work for me of calculating what those coordinates will be.

See the help notes in the function below for usage.

return to main page