From ab46c5c1b7a490b4ab7ccb011da8c8872785db87 Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Mon, 29 Sep 2014 15:45:14 -0700 Subject: Add method to override unscaling behavior --- src/github/daneren2005/dsub/util/FileUtil.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java index 9433043c..bf0f288b 100644 --- a/src/github/daneren2005/dsub/util/FileUtil.java +++ b/src/github/daneren2005/dsub/util/FileUtil.java @@ -257,9 +257,12 @@ public class FileUtil { } } public static Bitmap getScaledBitmap(Bitmap bitmap, int size) { + return getScaledBitmap(bitmap, size, true); + } + public static Bitmap getScaledBitmap(Bitmap bitmap, int size, boolean allowUnscaled) { // Don't waste time scaling if the difference is minor // Large album arts still need to be scaled since displayed as is on now playing! - if(size < 400 && bitmap.getWidth() < (size * 1.1)) { + if(allowUnscaled && size < 400 && bitmap.getWidth() < (size * 1.1)) { return bitmap; } else { return Bitmap.createScaledBitmap(bitmap, size, Util.getScaledHeight(bitmap, size), true); -- cgit v1.2.3