PsychoPy won't display phase-scrambled .png images created on Psychtoolbox

OS (e.g. Win10): Win10
PsychoPy version (e.g. 1.84.x): Python 3.7.4, PsychoPy 1.73.04
Standard Standalone? (y/n) If not then what?: Spyder
What are you trying to achieve?:
I am trying to display phase-scrambled .png images that I created on Matlab Psychtoolbox, on my experiment that I wrote in Spyder.

What did you try to make it work?:
I tried to display different .png images, .bmp gaussian noise images, and .tiff images, they all work: see here:

However, when I try to display my Phase-scrambled noise images, which are these files:

they appear like this.

I tried changing the monitor settings, units, size, position, etc. in the visual.ImageStim() but nothing makes it different. The phase-scrambled image I created is normalized to have values between 0 and 1. I was wondering if that could be the issue. If so, what is the best way to present images like this on my PsychoPy code? Any help would be appreciated.

Thanks in advance!

I sometimes have image files that don’t seem to be as compatible as expected, so I open and resave them in IrfanView. I think png files from GIMP are one source of such issues.

Best wishes


Solution to this was to convert this into a pillow image object, and then transforming the numbers from 0-1 range to 0-255 range. I hope this helps others who had a similar problem.