Image Size in Online Study

Hello,
I am trying to fix the image size in my experiment. Originally, on Builder, I had my image size set to ‘cm’ units so I controlled every image size on Excel. However, it doesn’t seem that Pavlovia considers sizing units apart from height, norm, or pixels. When I use height for my online study, the image takes up the whole screen, meanwhile when I use pixels the images don’t show up at all (but the study continues).

I guess I want to convert my cm units to norm units, so the images don’t shrink or stretch. Is there a way I can do this?
Or is there a way in which I can present images online without the image taking up the whole screen? I’m doing everything from Builder and transferring it to Pavlovia.

Edit: I tried changing the sizing units in the excel file to translate into norm units (i.e., one image had size [1.0,0.6] and the other had size [0.5,1.0] for example) and when I changed the image size to $size, the images did not show up at all. However, if I keep the image size a fixed number without considering the excel column, all of the images show up in that norm size, but I want to be able to use different norm sizes for certain images, not the same norm size for all images. It doesn’t recognize the excel column for sizing units when I make the study online, but it recognizes it on Psychopy builder.

Thank you.

my study uses norm units for image size, you might find some useful info in the psyexp file:

if you are presenting square pics in norm units for example, they will be landscape-shaped on laptops, portrait shaped on mobiles - they will fit the to the screen. If the size of the images aren’t completely necessary towards calculating the DV then just choose either norm units or screen height and use some trial and error until it works. E.g., in my study I got a feel for the sorts of images that look ok in both smartphone and laptop view after trial and error.

i don’t see why you would need to set size in the conditions file, can you not just have the images in the conditions file and set the sizes in the builder routine?

Hi Tom,

In your builder experiment, it looks like you have a fixed size in ‘size’ (size = 2,2). In mine, each image requires a different size - for example, some images are tall and some images are square. If I use the same size (which seems to be the only way for the experiment to run online) some images shrink/stretch.

ok so in my file I have a column of 20 images in my excel file called “object” - why do you not have one column for all objects one size “objectA” in your conditions file then create an image component in the builder file, set the size in the image component in the builder routine and refer to it using $objectA, then create another column in your conditions file for any objects a different size, call them “objectB”, then create a new image component in that same routine, refer to it using $objectB - see what I mean?

ok i see what you mean - its easy for you to create different sizes of images within your experiment.

But i don’t know how you’ll get round the stretching issue - thats why I suggested using images that work reasonably well using all different devices which I had to do. If the unit sizes of your images aren’t relevant towards calculating your dependent variables then its probably easier than trying to figure out some hardcore code that keeps them the same across devices (i doubt this is even possible).

good luck

I see what you mean. I just wanted to see if it was possible with online studies, or even in coding in HTML. I will probably need to find different images to fit the ‘square’ look.

Thanks.

Hi,

I think using norm units is the wrong choice for what your intend the result to be.

You should use either pix or height as unit.

I created a small demo project such that you can see the effect of the three units on image scaling:

As you mention that you have issues reading the values from a session file, I read the size values from a csv file in this project as well.

I hope this helps you in resolving your issues.

All the best,

Frank.

Hi Frank,

Thank you so much! I realized I needed two separate columns in excel for the size from looking at your .csv data.