Utility/Formats: STBLoader will now convert the image to RGB8 if it has no alpha value
This commit is contained in:
parent
ff7e64494f
commit
c523e3cde5
|
|
@ -82,6 +82,12 @@ namespace Nz
|
|||
|
||||
if (parameters.loadFormat != PixelFormatType_Undefined)
|
||||
image->Convert(parameters.loadFormat);
|
||||
else
|
||||
{
|
||||
// Optimize memory usage if possible
|
||||
if (!image->HasAlpha())
|
||||
image->Convert(PixelFormatType_RGB8);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue