For bug 77199

This commit is contained in:
Svetlana Kulikova
2025-10-24 14:23:45 +03:00
parent b7230d16fc
commit 4e7af40367
2 changed files with 8 additions and 8 deletions

View File

@ -3672,13 +3672,13 @@ std::vector<double> CPdfEditor::WriteRedact(const std::vector<std::wstring>& arr
BYTE* pMemory = pRender;
int ret = *((int*)pMemory);
pMemory += 4;
double R = ret / 100000.0;
LONG R = ret;
ret = *((int*)pMemory);
pMemory += 4;
double G = ret / 100000.0;
LONG G = ret;
ret = *((int*)pMemory);
double B = ret / 100000.0;
LONG lColor = (LONG)(((LONG)(R * 255)) | ((LONG)(G * 255) << 8) | ((LONG)(B * 255) << 16) | ((LONG)255 << 24));
LONG B = ret;
LONG lColor = (LONG)(R | (G << 8) | (B << 16) | ((LONG)255 << 24));
m_pWriter->AddRedact({});
double dM1, dM2, dM3, dM4, dM5, dM6;

View File

@ -841,13 +841,13 @@ void CPdfReader::DrawPageOnRenderer(IRenderer* pRenderer, int _nPageIndex, bool*
BYTE* pMemory = m_vRedact[i]->m_pChanges;
int ret = *((int*)pMemory);
pMemory += 4;
double R = ret / 100000.0;
LONG R = ret;
ret = *((int*)pMemory);
pMemory += 4;
double G = ret / 100000.0;
LONG G = ret;
ret = *((int*)pMemory);
double B = ret / 100000.0;
LONG lColor = (LONG)(((LONG)(R * 255)) | ((LONG)(G * 255) << 8) | ((LONG)(B * 255) << 16) | ((LONG)255 << 24));
LONG B = ret;
LONG lColor = (LONG)(R | (G << 8) | (B << 16) | ((LONG)255 << 24));
for (int j = 0; j < m_vRedact[i]->m_arrRedactBox.size(); j += 8)
{