From 777dc2174f34c2a4d4499c3d63ef8914ed9ecb81 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 7 Mar 2018 23:38:31 +0300 Subject: old AdvaImg services converted into Image_* functions --- protocols/Gadu-Gadu/src/image.cpp | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'protocols/Gadu-Gadu/src/image.cpp') diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 23c485b2ad..38540c4620 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -1054,19 +1054,10 @@ void* GaduProto::img_loadpicture(gg_event* e, wchar_t *szFileName) //////////////////////////////////////////////////////////////////// // Loading picture using Miranda Image services - // Load image from memory - if (!szFileName) - { - IMGSRVC_MEMIO memio; - memio.iLen = dat->nSize; - memio.pBuf = (void *)dat->lpData; - memio.fif = FIF_UNKNOWN; /* detect */ - memio.flags = 0; - dat->hBitmap = (HBITMAP)CallService(MS_IMG_LOADFROMMEM, (WPARAM)&memio, 0); - } - // Load image from file + if (!szFileName) // Load image from memory + dat->hBitmap = Image_LoadFromMem(dat->lpData, dat->nSize, FIF_UNKNOWN); else - dat->hBitmap = Bitmap_Load(szFileName); + dat->hBitmap = Bitmap_Load(szFileName); // Load image from file // If everything is fine return the handle if (dat->hBitmap) -- cgit v1.2.3