Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Scale images to fit screen

Hi,

I am presenting to participants a large number of different images which vary considerably in size. Some of them are having their ends cut off either vertically or horizontally during the experiment. How can I set up the stimulus presentation to scale the images to the size of the screen? I'm using the sketchpad to display the images.

Many thanks!

Comments

  • Hi stacey,

    Do the images have at least the same ratio? If so, you could compute the scaling factor based on the information you have, that is, image dimensions and screen dimensions:

    var.scale = image_width / float(var.width) # var.width represents the size of the experiment window
    

    From then on you can use var.scale to scale the images.

    Does that help?

    Eduard

Sign In or Register to comment.