psychopy.org | Reference | Downloads | Github

Image rotation - not all the images in the original folder display in the same orientation

Hi community,

I am new to PsychoPy and I am trying to do something as easy as to plot some images that I have in a folder.

  • The routine works but the orientation of the images is different - some are correctly oriented and some not… Does anyone know the reason/solution?

Here the part of the code (changing “ori” does not seem to be enough…)

for i in range(len(images)):                               
    img = visual.ImageStim(win=win,image=images[i],units="pix",mask=None, ori = 270,
                           pos=(0, 0), flipHoriz=False, flipVert=True, size = screen_size)

Thanks in advance!

What does that mean? Does changing the ori value have no effect, or an unexpected effect, or…

We really need to know more detail. It is very hard to judge the code in isolation (e.g. as shown, at the end of the loop, only one imagestim would exist).

Hi Michael,
Thanks for your reply.
By original value I mean the “default” value of 0. I put 270 and others but not all the images are presented in the correct orientation.
Do you know whether the problem might be related to the format of the images? I have them in .png.

Thanks for your help!

No, the format of the image isn’t relevant here.

As above, we need to see the code in context - we can’t currently see what happens between the creation of the object and when it is drawn.