summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/TabSRMM')
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp8
-rw-r--r--plugins/TabSRMM/src/themes.cpp13
2 files changed, 7 insertions, 14 deletions
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index fae16eb748..088a95636d 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -183,11 +183,11 @@ static void SaveAvatarToFile(CTabBaseDlg *dat, HBITMAP hbm, int isOwnPic)
IMGSRVC_INFO ii;
ii.cbSize = sizeof(ii);
- ii.wszName = szFinalFilename;
+ ii.szName.w = szFinalFilename;
ii.hbm = hbm;
ii.dwMask = IMGI_HBITMAP;
ii.fif = FIF_UNKNOWN; // get the format from the filename extension. png is default.
- CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_WCHAR);
+ Image_Save(&ii, IMGL_WCHAR);
}
}
@@ -1813,10 +1813,10 @@ void CTabBaseDlg::SendHBitmapAsFile(HBITMAP hbmp) const
IMGSRVC_INFO ii;
ii.cbSize = sizeof(ii);
ii.hbm = hbmp;
- ii.wszName = filename;
+ ii.szName.w = filename;
ii.dwMask = IMGI_HBITMAP;
ii.fif = FIF_JPEG;
- CallService(MS_IMG_SAVE, (WPARAM)&ii, IMGL_WCHAR);
+ Image_Save(&ii, IMGL_WCHAR);
int totalCount = 0;
wchar_t **ppFiles = nullptr;
diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp
index 1ef9533f8e..ec2390160a 100644
--- a/plugins/TabSRMM/src/themes.cpp
+++ b/plugins/TabSRMM/src/themes.cpp
@@ -1722,7 +1722,7 @@ void CSkin::setupAeroSkins()
m_dwmColorRGB = RGB((BYTE)fr, (BYTE)fg, (BYTE)fb);
- FIBITMAP *fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
+ FIBITMAP *fib = (FIBITMAP *)Image_Load(tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
HBITMAP hbm = FreeImage_CreateHBITMAPFromDIB(fib);
@@ -1764,7 +1764,7 @@ void CSkin::setupAeroSkins()
if (!PathFileExists(tszFilename))
mir_snwprintf(tszFilename, L"%stabskin_aero_glow.png", tszBasePath);
- fib = (FIBITMAP *)CallService(MS_IMG_LOAD, (WPARAM)tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
+ fib = (FIBITMAP *)Image_Load(tszFilename, IMGL_WCHAR | IMGL_RETURNDIB);
COLORREF glowColor = M.GetDword(FONTMODULE, "aeroGlow", RGB(40, 40, 255));
hbm = FreeImage_CreateHBITMAPFromDIB(fib);
@@ -2078,14 +2078,7 @@ HBITMAP CSkin::ResizeBitmap(HBITMAP hBmpSrc, LONG width, LONG height, bool &must
GetObject(hBmpSrc, sizeof(bm), &bm);
if (bm.bmHeight != height || bm.bmWidth != width) {
- ::ResizeBitmap rb;
- rb.size = sizeof(rb);
- rb.fit = RESIZEBITMAP_STRETCH;
- rb.max_height = height;
- rb.max_width = width;
- rb.hBmp = hBmpSrc;
-
- HBITMAP hbmNew = (HBITMAP)CallService(MS_IMG_RESIZE, (WPARAM)&rb, 0);
+ HBITMAP hbmNew = Image_Resize(hBmpSrc, RESIZEBITMAP_STRETCH, height, width);
if (hbmNew != hBmpSrc)
mustFree = true;
return(hbmNew);