summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src/avatars.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram/src/avatars.cpp')
-rw-r--r--protocols/Telegram/src/avatars.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/protocols/Telegram/src/avatars.cpp b/protocols/Telegram/src/avatars.cpp
index 873db7663f..0636af1f04 100644
--- a/protocols/Telegram/src/avatars.cpp
+++ b/protocols/Telegram/src/avatars.cpp
@@ -253,6 +253,14 @@ void CTelegramProto::ProcessFile(TD::updateFile *pObj)
FreeImage_Unload(pImage);
}
}
+ else if (F->m_fileName.Right(4).MakeLower() == L".tga") {
+ if (auto *pImage = FreeImage_LoadU(FIF_TARGA, wszExistingFile)) {
+ wszFullName.Truncate(wszFullName.GetLength() - 5);
+ wszFullName += L".png";
+ FreeImage_SaveU(FIF_PNG, pImage, wszFullName);
+ FreeImage_Unload(pImage);
+ }
+ }
else MoveFileW(wszExistingFile, wszFullName);
if (F->m_isSmiley)