Utility/Formats: STBLoader will now convert the image to RGB8 if it has no alpha value

This commit is contained in:
Lynix 2016-11-18 01:16:36 +01:00
parent ff7e64494f
commit c523e3cde5
1 changed files with 6 additions and 0 deletions

View File

@ -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;
}