diff options
author | George Hazan <ghazan@miranda.im> | 2018-01-26 17:38:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-01-26 17:38:31 +0300 |
commit | dea9c030340e50324eba97c72a27c151bed12e1c (patch) | |
tree | 6fc156f40f52a9fc6e6b29e60001959477ee1a5e /protocols/VKontakte/src/misc.cpp | |
parent | c6e8f8223cab9d799593b7b2cfa22134aa9745d6 (diff) |
AdvaImg:
- freeimage extracted to the separate library;
- FI_INTERFACE removed, all references to it are replaced with direct calls of FreeImage_* functions;
- unified project for AdvaImg
Diffstat (limited to 'protocols/VKontakte/src/misc.cpp')
-rw-r--r-- | protocols/VKontakte/src/misc.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index b9d155e48b..1169de5b01 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -1469,16 +1469,16 @@ void CVkProto::ShowCaptchaInBrowser(HBITMAP hBitmap) if (pFile == nullptr)
return;
- FIBITMAP *dib = fii->FI_CreateDIBFromHBITMAP(hBitmap);
- FIMEMORY *hMem = fii->FI_OpenMemory(nullptr, 0);
- fii->FI_SaveToMemory(FIF_PNG, dib, hMem, 0);
+ FIBITMAP *dib = FreeImage_CreateDIBFromHBITMAP(hBitmap);
+ FIMEMORY *hMem = FreeImage_OpenMemory(nullptr, 0);
+ FreeImage_SaveToMemory(FIF_PNG, dib, hMem, 0);
BYTE *buf = nullptr;
DWORD bufLen;
- fii->FI_AcquireMemory(hMem, &buf, &bufLen);
+ FreeImage_AcquireMemory(hMem, &buf, &bufLen);
ptrA base64(mir_base64_encode(buf, bufLen));
- fii->FI_CloseMemory(hMem);
- fii->FI_Unload(dib);
+ FreeImage_CloseMemory(hMem);
+ FreeImage_Unload(dib);
CMStringA szHTML(FORMAT, "<html><body><img src=\"data:image/png;base64,%s\" /></body></html>", base64);
fwrite(szHTML, 1, szHTML.GetLength(), pFile);
|