aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2014-09-10 09:11:19 -0700
committerScott Jackson <daneren2005@gmail.com>2014-09-10 09:11:19 -0700
commit9067a38fb57802725a5c102dc2404fffe090f38c (patch)
tree3642e0a703170044d5fe02251cbdf85a37383bbd /src
parentc6188027e605a9c4f8fc4b5f166f304dea28238b (diff)
downloaddsub-9067a38fb57802725a5c102dc2404fffe090f38c.tar.gz
dsub-9067a38fb57802725a5c102dc2404fffe090f38c.tar.bz2
dsub-9067a38fb57802725a5c102dc2404fffe090f38c.zip
Only use non-rescaled bitmaps for small bitmaps
Large bitmaps are used as is on the now playing screen. This causes strange effects if the bitmap is too small. Everywhere else, it appears to be scaled to the correct size via the canvas it is applied to.
Diffstat (limited to 'src')
-rw-r--r--src/github/daneren2005/dsub/util/FileUtil.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/github/daneren2005/dsub/util/FileUtil.java b/src/github/daneren2005/dsub/util/FileUtil.java
index 6246c2de..59504ad0 100644
--- a/src/github/daneren2005/dsub/util/FileUtil.java
+++ b/src/github/daneren2005/dsub/util/FileUtil.java
@@ -256,7 +256,8 @@ public class FileUtil {
}
public static Bitmap getScaledBitmap(Bitmap bitmap, int size) {
// Don't waste time scaling if the difference is minor
- if(bitmap.getWidth() < (size * 1.1)) {
+ // Large album arts still need to be scaled since displayed as is on now playing!
+ if(size < 500 && bitmap.getWidth() < (size * 1.1)) {
return bitmap;
} else {
return Bitmap.createScaledBitmap(bitmap, size, Util.getScaledHeight(bitmap, size), true);