Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2443)

Unified Diff: core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp

Issue 1663983002: Support 16-bit images in downsampler. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1f4ba62b0a64730683e95ca71529fd7fb9c7a2ad..e62290fdbbf34a6e1e201c268418e0bc3a7eae61 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698