diff options
Diffstat (limited to 'plugins/HistoryStats/src/bandctrlimpl.cpp')
-rw-r--r-- | plugins/HistoryStats/src/bandctrlimpl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/HistoryStats/src/bandctrlimpl.cpp b/plugins/HistoryStats/src/bandctrlimpl.cpp index f0553dd4c6..f9f953fcc3 100644 --- a/plugins/HistoryStats/src/bandctrlimpl.cpp +++ b/plugins/HistoryStats/src/bandctrlimpl.cpp @@ -424,15 +424,15 @@ HICON BandCtrlImpl::convertToGray(HICON hIcon) BITMAP bmp;
if (GetObject(ii.hbmColor, sizeof(bmp), &bmp) && bmp.bmBitsPixel == 32) {
int nSize = bmp.bmHeight * bmp.bmWidthBytes;
- BYTE* pBits = new BYTE[nSize];
+ uint8_t* pBits = new uint8_t[nSize];
if (GetBitmapBits(ii.hbmColor, nSize, pBits)) {
for (int y = 0; y < bmp.bmHeight; ++y) {
- BYTE* pLine = pBits + y * bmp.bmWidthBytes;
+ uint8_t* pLine = pBits + y * bmp.bmWidthBytes;
for (int x = 0; x < bmp.bmWidth; ++x) {
DWORD color = reinterpret_cast<DWORD*>(pLine)[x];
- BYTE gray = (77 * GetBValue(color) + 150 * GetGValue(color) + 28 * GetRValue(color)) / 255;
+ uint8_t gray = (77 * GetBValue(color) + 150 * GetGValue(color) + 28 * GetRValue(color)) / 255;
color = (color & 0xFF000000) | RGB(gray, gray, gray);
|