| Reference | Downloads | Github

Borders on some images

My entire experiment runs smoothly, but some (but not all) images are displaying with partial borders/edges on some of the sides. This is happening with both .jpeg and .png images. The borders are not visible for all images, and the problematic ones have the same format and settings as the images that display as they should. This has only been an issue on Mac desktop computers (Mac laptop, and Windows laptops are displaying images as they should), but I need to run the experiment on Mac desktops when testing. I was wondering if any one had encountered a similar issue, and would be able to help me? Please see attached images.

I have tried opening the images on photoshop and saving them on a white background, but the issue remained. I also tried looking for differences between images that were displaying with and without borders, and checked for things like whether there was an alpha channel on any of them, but these were not the issue. I’d really appreciate if someone took the time to assist, or suggest any ways to fix this.

Thank you!

Hi @saba1, which version of PsychoPy are you using ?

Hi @dvbridges, I’m using PsychoPy v3.2.4.

Thanks @saba1, this was an issue that was mostly fixed, but Jon will look into why the border is being presented. In the mean time, try setting your image component to use “nearest” (neighbour) interpolation (see image component “advanced” tab). This may make your image look slightly jagged, but may fix the border issue.

It would be very useful for bug fixing if you could provide details of your two macs that do and do not produce the issue e.g., OS versions, graphics card and drivers, screen types, and anything else you want to add.

1 Like

Hi @dvbridges,

Thanks for your response. I have set the image components to “nearest” (neighbour) interpolation, and all the images are now displaying as they should. Thank you so much for your advice.

Please see below for the details about the computers that you asked for:

MacBook Air- on which the images displayed correctly (without borders), even when image interpolation was “linear”:

Mac OS Mojave

Version 10.14.1

MacBook Air 13 inch, early 2014

Processor 1.4 GHz Intel core i5

Memory 4 GB 1600 MHz DDR3

Start up disk Macintosh HD

Graphics Intel HD Graphics 5000 1536 MB graphics

Desktop iMac - on which the images were displaying with partial borders (until I changed the image interpolation to “nearest”)

Mac OS High Sierra

Version 10.13.6

iMac 21.5 inch, late 2013

Processor 2.7 intel core i5

Memory 8 GB 1600 MHz DDR3

Graphics intel iris Pro 1536

Thank you again for your help, I really appreciate it.

Kind regards,


1 Like

Hi, I seem to be having a related problem with my .jpg images in PsychoPy v2020.1.3. All of the images have thin black borders-- including two examples. These are images I padded to be square with the default background gray (same issue when padded w/ other colors though). Just like in the suggestion, the borders disappear on most images when settings are switched from ‘linear’ to ‘nearest’ but I’m hoping to not have this loss in image quality for all stimuli.

No borders appeared for corresponding square .png images (transparent borders), but because of the large number of pictures, the online study took a long time to load and I was hoping to use the much smaller jpg set.

Any tricks or workarounds for this? Could I edit the jpg image set somehow or use a mask? Many thanks!

(Dell Windows 10 laptop / Intel UHD Graphics / Python 3.8.2)