mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-04 17:24:47 +00:00
Fixed: Instead of returning an error, convert the bitmap in RGBA
This commit is contained in:
parent
c1a7684179
commit
dfc0154fe1
1 changed files with 5 additions and 1 deletions
|
@ -268,7 +268,11 @@ int main(int nNbArg, char **ppArgs)
|
||||||
|
|
||||||
uint8 colors = pBtmp->load(inFile);
|
uint8 colors = pBtmp->load(inFile);
|
||||||
|
|
||||||
if (colors != 32) throw NLMISC::Exception(AllMapNames[i] + " is using " + toString(colors) + " bits colors, only 32 bit supported!");
|
if (pBtmp->getPixelFormat() != CBitmap::RGBA)
|
||||||
|
{
|
||||||
|
nlwarning("Converting %s to RGBA (32 bits), originally using %u bits...", AllMapNames[i].c_str(), (uint)colors);
|
||||||
|
pBtmp->convertToType(CBitmap::RGBA);
|
||||||
|
}
|
||||||
|
|
||||||
AllMaps[i] = pBtmp;
|
AllMaps[i] = pBtmp;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue