psychopy.org | Reference | Downloads | Github

Lab computer does not display certain .jpg images

Hello,

I have a rather weird issue with displaying jpg images on lab computer. It works perfectly fine on my laptop but when I try to load it on my lab computer the image doesn’t show. Instead, an empty shape appears.

Basically, instead of this:

I get this:

Interestingly, this only happens with images made in COREL that serve as instructions. However, when I tested a sample jpg picture like the one below, it works just fine:
[can’t display the working picture due to 2 picture topic limit]

I use psychopy 1.83.04 (on both computers) and define an examplary instruction image as follows:
win = visual.Window ([800,600], allowGUI=False, monitor=‘testMonitor’, units=‘pix’, color=[0.000, 0.000, 0.000], fullscr=True)
Instr1 = visual.ImageStim(win, image=‘INSTR 1.jpg’,size=(1000,800))
and then use the draw method in the main task:
instr1.draw()
win.flip()
event.waitKeys()

It does not seem to be a matter of size or shape of the jpg, as I experimented with both with same effects. I have no clue what might be causing such behavior on the lab computer (which, admittedly, is rather old). I would be greatful for your help!

I’m not sure what’s special about jpg images from Corel but hopefully that can save png files as well and these are a superior format, especially for text rendering. jpg files can cause nasty ripples at the edges of hard edges.

What OS and version?

More generally, jpeg is a lossy format, so a stimulus image will not match its specification exactly. For some experiments, artifacts in lossy images could change results, for others not. With image stimuli for psychology/psychophysics, it is best to always, as a habit, use a lossless format than to consider and make a decision per experiment about whether lossy is acceptable.

TIFF and PNG are both lossless, Psychopy will load and display both.

Allen