summaryrefslogtreecommitdiff
path: root/plugins/FingerprintNG/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-12-26 17:06:04 +0300
commit1039b2829a264280493ba0fa979214fe024dc70c (patch)
tree8fa6a60eb46627582c372b56a4a1d4754d6732c3 /plugins/FingerprintNG/src
parent62a186697df33c96dc1a6dac0f4dfc38652fb96f (diff)
WORD -> uint16_t
Diffstat (limited to 'plugins/FingerprintNG/src')
-rw-r--r--plugins/FingerprintNG/src/fingerprint.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp
index 4302d48ab2..762b15b880 100644
--- a/plugins/FingerprintNG/src/fingerprint.cpp
+++ b/plugins/FingerprintNG/src/fingerprint.cpp
@@ -479,9 +479,9 @@ DWORD __fastcall blend(DWORD X1, DWORD X2)
RGBA* q2 = (RGBA*)&X2;
uint8_t a_1 = ~q1->a;
uint8_t a_2 = ~q2->a;
- WORD am = q1->a * a_2;
+ uint16_t am = q1->a * a_2;
- WORD ar = q1->a + ((a_1 * q2->a) / 255);
+ uint16_t ar = q1->a + ((a_1 * q2->a) / 255);
// if a2 more than 0 than result should be more
// or equal (if a1==0) to a2, else in combination
// with mask we can get here black points
@@ -491,10 +491,10 @@ DWORD __fastcall blend(DWORD X1, DWORD X2)
if (ar == 0) return 0;
{
- WORD arm = ar * 255;
- WORD rr = ((q1->r * am + q2->r * q2->a * 255)) / arm;
- WORD gr = ((q1->g * am + q2->g * q2->a * 255)) / arm;
- WORD br = ((q1->b * am + q2->b * q2->a * 255)) / arm;
+ uint16_t arm = ar * 255;
+ uint16_t rr = ((q1->r * am + q2->r * q2->a * 255)) / arm;
+ uint16_t gr = ((q1->g * am + q2->g * q2->a * 255)) / arm;
+ uint16_t br = ((q1->b * am + q2->b * q2->a * 255)) / arm;
return (ar << 24) | (rr << 16) | (gr << 8) | br;
}
}