Zoom into Picture

URL of experiment: masked [PsychoPy]

Description of the problem: I am trying to zoom into Imagestims. Now the problem is that the zoom is very choppy and not smooth at all and on top of that sometimes the Experiment just crashes. Any Idea how to solve this problem?

There have been big improvements in memory leaks since 2020.1.3, especially in relation to components which change every frame. I would recommend you try upgrading to 2020.2.10 or 2021.1.4.

Could you share your repo with me so I can take a peek at your code? (make me a maintainer, username tpronk)

The repo is public.

Check. Thnx @wakecarter

The approach you took (changing width and height on each frame) is also how I would have done it…
(600 + (300 * t * 2) , 800 + (300 * t*2))

I’ll ask around whether I missed something. As interim solution, perhaps rendering them as videos would help?

Update. I notice that the first image seems to go comparatively smooth; have you got that too?
Update2. Yeah it’s 2021.1.4

Did you notice the version? I got a lot of crashes with dynamic stimuli in 2020.1

Was editing while @wakecarter posted. Quote below

Hey sorry for replying so late. Yeah I have tried running it on 2021.1.4 it’s still very choppy for me and occasionally crashes.

Does the first picture go a bit smoother than the later pictures? (like I had)

Ok so after further testing only some pictures seem to Zoom choppy while others are go smoother.

The picture z138_m_f_n_b_mit.jpg is very smooth for example z144_y_m_n_b.jpg however is choppy. I thought it might be the filesize but I changed them all to be the same size.

My guess is that the problem is that PsychoJS, because it is geared at accurately showing/hiding static pictures, isn’t very suitable for running animations like the zooming you’re doing. I could ask the team to dive into it, but it might take quite a while before they would deliver something that’s of use to you. Is using videos an option?

One test you could try – though it may not have any affect, is to make the change in Each Frame code instead of in the Builder component

picName.size = (600 + (300 * t * 2) , 800 + (300 * t*2))

Yeah I think we could have go for videos. Thank you for helping me though! I don’t think animations are a big priority but in the future I think it could be a good addition.

Yeah I also thought that this might be the problem and already changed it to using the Each Frame code but it’s still the same outcome. Apparently it’s also very computer dependent. Of the 15 People I asked to run the study for me 8 reported very smooth animations and 7 reported choppy animations all on completely different Hardware and all kinds of browsers.

Hope the videos will improve the zoom. About the animations; we’ve got a major overhaul planned of the way we’re presenting stimuli, but it’s quite a big project (think months). I’ll be sure to mention this as a possible use case the overhaul could address.