diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-07 23:38:31 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-07 23:38:31 +0300 |
commit | 777dc2174f34c2a4d4499c3d63ef8914ed9ecb81 (patch) | |
tree | 6d7c6c4b09287386739ba4cc7accde38ed90da8c /plugins/TipperYM/src | |
parent | e9e0d8203c36c1d2e2aa4201e01bf4206804f25b (diff) |
old AdvaImg services converted into Image_* functions
Diffstat (limited to 'plugins/TipperYM/src')
-rw-r--r-- | plugins/TipperYM/src/bitmap_func.cpp | 2 | ||||
-rw-r--r-- | plugins/TipperYM/src/options.cpp | 8 | ||||
-rw-r--r-- | plugins/TipperYM/src/popwin.cpp | 9 |
3 files changed, 3 insertions, 16 deletions
diff --git a/plugins/TipperYM/src/bitmap_func.cpp b/plugins/TipperYM/src/bitmap_func.cpp index 1ec2a3696a..d2f7f561b5 100644 --- a/plugins/TipperYM/src/bitmap_func.cpp +++ b/plugins/TipperYM/src/bitmap_func.cpp @@ -154,7 +154,7 @@ void CreateFromBitmaps(bool bServiceTip) if (tszFileName && *tszFileName != 0) {
FIBITMAP *fib = nullptr;
if (!skin.bCached) {
- FIBITMAP *fibLoad = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFileName, IMGL_WCHAR | IMGL_RETURNDIB);
+ FIBITMAP *fibLoad = (FIBITMAP *)Image_Load(tszFileName, IMGL_WCHAR | IMGL_RETURNDIB);
if (!fibLoad) continue;
if (FreeImage_GetBPP(fibLoad) != 32)
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index 17b3d0b310..15489d189c 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -1723,13 +1723,7 @@ INT_PTR CALLBACK DlgProcOptsSkin(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int iWidth = dis->rcItem.right - dis->rcItem.left;
int iHeight = dis->rcItem.bottom - dis->rcItem.top;
- ResizeBitmap rb = { 0 };
- rb.size = sizeof(rb);
- rb.hBmp = hbmpPreview;
- rb.max_width = iWidth;
- rb.max_height = iHeight;
- rb.fit = RESIZEBITMAP_KEEP_PROPORTIONS;
- HBITMAP hbmpRes = (HBITMAP)CallService(MS_IMG_RESIZE, (WPARAM)&rb, 0);
+ HBITMAP hbmpRes = Image_Resize(hbmpPreview, RESIZEBITMAP_KEEP_PROPORTIONS, iWidth, iHeight);
if (hbmpRes) {
BITMAP bmp;
GetObject(hbmpRes, sizeof(bmp), &bmp);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 0a5b82200e..7c97954284 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -498,14 +498,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETMYAVATAR, 0, (LPARAM)pwd->clcit.szProto); if (ace && ace->hbmPic && (ace->dwFlags & AVS_BITMAP_VALID) && !(ace->dwFlags & AVS_HIDEONCLIST)) { - ResizeBitmap rb = { 0 }; - rb.size = sizeof(rb); - rb.max_width = pwd->iRealAvatarWidth; - rb.max_height = pwd->iRealAvatarHeight; - rb.fit = RESIZEBITMAP_STRETCH | RESIZEBITMAP_KEEP_PROPORTIONS; - rb.hBmp = ace->hbmPic; - HBITMAP hbmpAvatar = (HBITMAP)CallService(MS_IMG_RESIZE, (WPARAM)&rb, 0); - + HBITMAP hbmpAvatar = Image_Resize(ace->hbmPic, RESIZEBITMAP_STRETCH | RESIZEBITMAP_KEEP_PROPORTIONS, pwd->iRealAvatarWidth, pwd->iRealAvatarHeight); if (hbmpAvatar) { HRGN hrgnAvatar = nullptr; if (opt.bAvatarRound) { |