user7585238
user7585238

Reputation: 63

Trouble loading .png file using LibGDX

It will load files badlogic.jpg and icon.png but it won't load start or stop.png files, yet they are in same folder.

Using Android Studio

enter image description here

Upvotes: 2

Views: 517

Answers (1)

AAryan
AAryan

Reputation: 20140

LibGdX uses stb_image for image loading.

no 16-bit-per-channel PNG is one of the limitation of std_image so you need to use 8 bit .png image.

https://github.com/libgdx/libgdx/blob/master/gdx/jni/gdx2d/stb_image.h#L24

You may check your image by ImageMagick. You can also use pngcheck for the same.

Upvotes: 5

Related Questions