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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 2718123002: Fix nits from earlier CLs (Closed)
Patch Set: Created 3 years, 10 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
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 450c2e487e71851cd1a2f105933038bf344a4124..a851901b3f25084f47c5bc75f67a684777b6b085 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -1444,7 +1444,10 @@ FPDF_DOCUMENT PDFiumEngine::CreateSinglePageRasterPdf(
FPDF_PAGEOBJECT temp_img = FPDFPageObj_NewImgeObj(temp_doc);
std::vector<uint8_t> compressed_bitmap_data;
- int quality = 40;
+ // Use quality = 40 as this does not significantly degrade the printed
+ // document relative to a normal bitmap and provides better compression than
+ // a higher quality setting.
+ const int quality = 40;
if (!(print_settings.format & PP_PRINTOUTPUTFORMAT_PDF) &&
(gfx::JPEGCodec::Encode(
bitmap_data, gfx::JPEGCodec::FORMAT_BGRA, FPDFBitmap_GetWidth(bitmap),
« pdf/pdfium/DEPS ('K') | « pdf/pdfium/DEPS ('k') | printing/print_job_constants.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698