PNG image shown as black box (Writer/Calc)

For some reason inserting a PNG image with no alpha channel results in a black box. This happens in Libreoffice for mac and for Linux, however is working in Windows. (Writer and Calc)

Image:

image description

Problem:

Strangely, this does not seem to be the case for Libreoffice Impress / Powerpoint files. Any idea what might be going wrong?

Attachments:

Sample Spreadsheet.ods

qrcode.png

sample_document.odt

Edit:
Libreoffice Info:

Edit 2:
FYI: I did try with enabling and disabling the “Use OpenGL for all rendering” option.

I also see that converting the color mode to greyscale or black/white does render this image properly.

Furthermore, the preview when opening Libreoffice shows the correct image for Writer but not for Spreadsheet:

Can’t confirm for my Libreoffice version 6.2.8.2 on Linux openSUSE Leap 15.1. Both attachments show the QR code.

This could be a system-dependent bug. Please file it to bug tracker. Thanks!

LibreOffice comes with OpenGL rendering enabled by default and this configuration might cause problems with certain combinations of graphics hardware and their drivers,…

Please check and see:

OpenGL

In LibreOffice in the Tools>Options>View menu, switch off OpenGL if there is a graphic output.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Edits from the comments:

EDIT_1: Did you restart LibreOffice afterwards?

EDIT_2: My suggestion: Try to convert the PNG into a JPG or click on the image in LibreOffice and choose save. Insert and test the new images again.

EDIT_3: You can try to reset your user profile.
Save the existing user profile beforehand.

I tried with both enabling and disabling (restarting on each change) “Use OpenGl for all rendering”, but the result is the same.
Am I missing something?

Did you restart LibreOffice afterwards?

yep, even restarted my mac to be sure.

My suggestion: Try to convert the PNG into a JPG or click on the image in LibreOffice and choose save.
Insert and test the new images again.

I do have a workaround for it. The image is being generated by a library and inserted into document programmatically and exported to PDF. Not sure if i should file a bug report.

You can try to reset your user profile.
Save the existing user profile beforehand.