mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-10 07:50:44 +00:00
Merge pull request #1246 from marauder2k9-torque/stb-console-spam
Update bitmapSTB.cpp
This commit is contained in:
commit
548796af01
1 changed files with 1 additions and 12 deletions
|
|
@ -328,19 +328,8 @@ bool sReadStreamSTB(Stream& stream, GBitmap* bitmap, U32 len)
|
|||
stream.read(len, data);
|
||||
|
||||
S32 width, height, comp = 0;
|
||||
if (stbi_info_from_memory(data, len, &width, &height, &comp))
|
||||
{
|
||||
const char* stbErr = stbi_failure_reason();
|
||||
|
||||
if (!stbErr)
|
||||
stbErr = "Unknown Error!";
|
||||
|
||||
Con::errorf("STB get memory info: %s", stbErr);
|
||||
}
|
||||
|
||||
S32 reqCom = comp;
|
||||
|
||||
unsigned char* pixelData = stbi_load_from_memory((const U8*)data, (int)len, &width, &height, &comp, reqCom);
|
||||
unsigned char* pixelData = stbi_load_from_memory((const U8*)data, (int)len, &width, &height, &comp, 0);
|
||||
|
||||
if (!pixelData)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue