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

Unified Diff: chrome/browser/history/thumbnail_database.cc

Issue 8631002: [ntp4] Use highest quality jpeg compression for thumbnail images. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month 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 | chrome/browser/history/top_sites.cc » ('j') | ui/gfx/image/image_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/thumbnail_database.cc
===================================================================
--- chrome/browser/history/thumbnail_database.cc (revision 111060)
+++ chrome/browser/history/thumbnail_database.cc (working copy)
@@ -42,6 +42,10 @@
static const int kCurrentVersionNumber = 5;
static const int kCompatibleVersionNumber = 5;
+// Use 90 quality (out of 100) which is pretty high, because we're very
+// sensitive to artifacts for these small sized, highly detailed images.
+static const int kImageQuality = 90;
+
ThumbnailDatabase::ThumbnailDatabase()
: history_publisher_(NULL),
use_top_sites_(false) {
@@ -262,7 +266,8 @@
return;
std::vector<unsigned char> jpeg_data;
- bool encoded = gfx::JPEGEncodedDataFromImage(*thumbnail, &jpeg_data);
+ bool encoded = gfx::JPEGEncodedDataFromImage(*thumbnail, kImageQuality,
+ &jpeg_data);
if (encoded) {
statement.BindInt64(0, id);
statement.BindDouble(1, score.boring_score);
« no previous file with comments | « no previous file | chrome/browser/history/top_sites.cc » ('j') | ui/gfx/image/image_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698