summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
index 0362ff2e90..9497943fbd 100644
--- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
+++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
@@ -957,8 +957,11 @@ void CPDF_DIBSource::ValidateDictParam() {
m_bpc = 1;
m_nComponents = 1;
}
- if (filter == FX_BSTRC("RunLengthDecode") ||
- filter == FX_BSTRC("DCTDecode")) {
+ if (filter == FX_BSTRC("RunLengthDecode")) {
+ if (m_bpc != 1) {
+ m_bpc = 8;
+ }
+ } else if (filter == FX_BSTRC("DCTDecode")) {
m_bpc = 8;
}
} else if (pFilter->GetType() == PDFOBJ_ARRAY) {