简体   繁体   中英

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

在此处输入图片说明

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM