Index: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
index c74aea9a21dadc59253b721492175213bc5a6e6c..f690c209a0598c6c0ef832da9fc6ce2960baa34e 100644 |
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp |
@@ -6,6 +6,7 @@ |
#include "render_int.h" |
+#include <algorithm> |
#include <memory> |
#include <vector> |
@@ -573,8 +574,8 @@ DIB_COMP_DATA* CPDF_DIBSource::GetDecodeAndMaskArray(FX_BOOL& bDefaultDecode, |
for (FX_DWORD i = 0; i < m_nComponents; i++) { |
int min_num = pArray->GetInteger(i * 2); |
int max_num = pArray->GetInteger(i * 2 + 1); |
- pCompData[i].m_ColorKeyMin = FX_MAX(min_num, 0); |
- pCompData[i].m_ColorKeyMax = FX_MIN(max_num, max_data); |
+ pCompData[i].m_ColorKeyMin = std::max(min_num, 0); |
+ pCompData[i].m_ColorKeyMax = std::min(max_num, max_data); |
} |
} |
bColorKey = TRUE; |