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

Unified Diff: chrome/browser/history/top_sites.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
Index: chrome/browser/history/top_sites.cc
===================================================================
--- chrome/browser/history/top_sites.cc (revision 111060)
+++ chrome/browser/history/top_sites.cc (working copy)
@@ -59,6 +59,10 @@
static const int64 kMinUpdateIntervalMinutes = 1;
static const int64 kMaxUpdateIntervalMinutes = 60;
+// Use 100 quality (highest quality) because we're very sensitive to
+// artifacts for these small sized, highly detailed images.
+static const int kTopSitesImageQuality = 100;
+
const TopSites::PrepopulatedPage kPrepopulatedPages[] = {
{ IDS_CHROME_WELCOME_URL, IDS_NEW_TAB_CHROME_WELCOME_PAGE_TITLE,
IDR_PRODUCT_LOGO_16, IDR_NEWTAB_CHROME_WELCOME_PAGE_THUMBNAIL,
@@ -619,7 +623,7 @@
return false;
*bytes = new RefCountedBytes();
std::vector<unsigned char> data;
- if (!gfx::JPEGEncodedDataFromImage(*bitmap, &data))
+ if (!gfx::JPEGEncodedDataFromImage(*bitmap, kTopSitesImageQuality, &data))
return false;
// As we're going to cache this data, make sure the vector is only as big as

Powered by Google App Engine
This is Rietveld 408576698