From c484f5497c7263ab7012bad600caea9e493f465c Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Wed, 11 May 2016 14:31:34 -0700 Subject: [PATCH] Use Q=100 JPEG instead of PNG for wallpaper display The quality difference is minimal, but the time to process the wallpaper is an order of magnitude lower for JPEG. The source imagery is still being preserved in its original format and resolution; this affects only the scaled/cropped version used on-screen. Bug 28672266 Change-Id: I193854348ffb7eeb9e45dc08b8ef7173ea75c240 --- .../com/android/server/wallpaper/WallpaperManagerService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java index 4c7f9eb705c6f..06b93293b9ba6 100644 --- a/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java +++ b/services/core/java/com/android/server/wallpaper/WallpaperManagerService.java @@ -432,7 +432,7 @@ public class WallpaperManagerService extends IWallpaperManager.Stub { f = new FileOutputStream(wallpaper.cropFile); bos = new BufferedOutputStream(f, 32*1024); - finalCrop.compress(Bitmap.CompressFormat.PNG, 90, bos); + finalCrop.compress(Bitmap.CompressFormat.JPEG, 100, bos); bos.flush(); // don't rely on the implicit flush-at-close when noting success success = true; }