Closed tirrcute closed 2 years ago
You can do the following steps:
MGUI_RWFromFile
to create an MG_RWops
object.CheckBitmapType
function to determine the file type. This function will returns the correct extension name of the image file type if it can be distinguished by MiniGUI.LoadBitmapEx2
or other API to load the bitmap from the MG_RWops
object and the extension name returned by CheckBitmapType
.MG_RWops
object by calling MGUI_RWclose
.Good Luck!
您好,请问下minigui有根据文件内容判断图片格式的API嘛,目前读取一张无后缀的图片或者后缀信息错误(比如是png格式,后缀写成jpg格式)的时候bitmap好像加载不出来了。