mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-27 19:30:54 +00:00
Changed: Allow to write interface into a PNG file
This commit is contained in:
parent
440084d5da
commit
51bfb41c64
1 changed files with 13 additions and 2 deletions
|
@ -366,9 +366,20 @@ int main(int nNbArg, char **ppArgs)
|
|||
fmtName += ".tga";
|
||||
if (outTga.open(fmtName))
|
||||
{
|
||||
GlobalTexture.writeTGA (outTga, 32);
|
||||
std::string ext;
|
||||
if (toLower(fmtName.find(".png")) != string::npos)
|
||||
{
|
||||
ext = "png";
|
||||
GlobalTexture.writePNG (outTga, 32);
|
||||
}
|
||||
else
|
||||
{
|
||||
ext = "tga";
|
||||
GlobalTexture.writeTGA (outTga, 32);
|
||||
}
|
||||
|
||||
outTga.close();
|
||||
outString (string("Writing tga file : ") + fmtName + "\n");
|
||||
outString (toString("Writing %s file : %s\n", ext.c_str(), fmtName.c_str()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue