Some PNG files do not load properly

I’ve seen some issues recently where some PNG files do not appear correct when viewed in the Content Browser – either they’re all black or a tangle of random colors. Recently, it’s been a bunch of 64x64 icons exported from GIMP 2 with no alpha transparency. Some of the icons will load fine, but some do not. Re-importing or changing the textures’ properties does not fix this.

We seem to be able to work around this by loading the PNG files up in MS Paint and re-saving. UE4 can then load the PNG files properly every time.

Not a real problem for us since there’s a trivial workaround, but we wanted to let you know that this problem in the PNG loading code exists.

I’ve attached 2 PNG files. icon_drone_64.png seems to have the problem; icon_drone_64_2.png (the same PNG re-exported from MS Paint) does not.

icon_drone_64.png

icon_drone_64.png

The issue is simple. You saved the image from Gimp in Grayscale mode. Rocket supports only RGB colors. When you saved the image in MS Paint it saved as RGB color so Rocket accepts it without issues. Next time when you export images from Gimp or Photoshop make sure it is in RGB Color.

http://docs.gimp.org/en/gimp-image-convert-rgb.html

That’s odd; I never set it to greyscale. GIMP must have done that on its own.

Very odd.

Anyway – thanks for the answer.