diff options
-rw-r--r-- | DEPS | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -8,7 +8,7 @@ deps = { "https://chromium.googlesource.com/chromium/buildtools.git@c2f259809d5ede3275df5ea0842f0431990c4f98", "testing/corpus": - "https://pdfium.googlesource.com/pdfium_tests@cc132ff8921c76ea69888cae4bb00e01dd1ce0b3", + "https://pdfium.googlesource.com/pdfium_tests@bafb069353f96d441c6a37786d18cd9f5407937f", "testing/gmock": "https://chromium.googlesource.com/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271", diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index 1f4ba62b0a..e62290fdbb 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -1473,6 +1473,11 @@ void CPDF_DIBSource::DownSampleScanline32Bit(int orig_Bpp, src_bit_pos += m_bpc; } pSrcPixel = extracted_components; + } else if (m_bpc == 16) { + for (FX_DWORD j = 0; j < m_nComponents; ++j) { + extracted_components[j] = pSrcPixel[j * 2]; + } + pSrcPixel = extracted_components; } if (m_pColorSpace) { |