summaryrefslogtreecommitdiff
path: root/plugins/AVS/src/image_utils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-11-12 21:44:56 +0300
commit53fe3e46177d17b4941610de19f5cc6210700cb4 (patch)
treeb67a6bc208dad141f9db14035cd7e42ff2a51872 /plugins/AVS/src/image_utils.cpp
parent488214ac8af0c4aeb1a5c1d8fd48368daaf4c4c7 (diff)
db_* functions replaced with g_plugin calls
Diffstat (limited to 'plugins/AVS/src/image_utils.cpp')
-rw-r--r--plugins/AVS/src/image_utils.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp
index d89448e359..9717e5ddb4 100644
--- a/plugins/AVS/src/image_utils.cpp
+++ b/plugins/AVS/src/image_utils.cpp
@@ -319,7 +319,7 @@ BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap)
GetObject(*hBitmap, sizeof(bmp), &bmp);
int width = bmp.bmWidth;
int height = bmp.bmHeight;
- int colorDiff = db_get_w(hContact, "ContactPhoto", "TranspBkgColorDiff", db_get_w(0, AVS_MODULE, "TranspBkgColorDiff", 10));
+ int colorDiff = db_get_w(hContact, "ContactPhoto", "TranspBkgColorDiff", g_plugin.getWord("TranspBkgColorDiff", 10));
// Min 5x5 to easy things in loop
if (width <= 4 || height <= 4)
@@ -414,7 +414,7 @@ BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap)
if (foundBkg[i])
count++;
- if (count < db_get_w(hContact, "ContactPhoto", "TranspBkgNumPoints", db_get_w(0, AVS_MODULE, "TranspBkgNumPoints", 5))) {
+ if (count < db_get_w(hContact, "ContactPhoto", "TranspBkgNumPoints", g_plugin.getWord("TranspBkgNumPoints", 5))) {
if (hBmpTmp != *hBitmap)
DeleteObject(hBmpTmp);
free(p);
@@ -440,7 +440,7 @@ BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap)
}
if (maxCount < db_get_w(hContact, "ContactPhoto", "TranspBkgNumPoints",
- db_get_w(0, AVS_MODULE, "TranspBkgNumPoints", 5))) {
+ g_plugin.getWord("TranspBkgNumPoints", 5))) {
// Not enought corners with the same color
if (hBmpTmp != *hBitmap) DeleteObject(hBmpTmp);
free(p);
@@ -480,7 +480,7 @@ BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap)
}
// Set alpha from borders
- bool transpProportional = (db_get_b(NULL, AVS_MODULE, "MakeTransparencyProportionalToColorDiff", 0) != 0);
+ bool transpProportional = (g_plugin.getByte("MakeTransparencyProportionalToColorDiff", 0) != 0);
int *stack = (int *)malloc(width * height * 2 * sizeof(int));
if (stack == nullptr) {