[Android] Audio player: enable bilinear sampling to display the big cover
Adrien Maglo
git at videolan.org
Fri Dec 6 10:43:10 CET 2013
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Fri Dec 6 10:43:00 2013 +0100| [4d7e30674227e4d853fb2df12e6e337ac9152f31] | committer: Adrien Maglo
Audio player: enable bilinear sampling to display the big cover
This prevents to show pixelated images when the resolution of the cover is small.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=4d7e30674227e4d853fb2df12e6e337ac9152f31
---
vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
index ae4a265..2f0f225 100644
--- a/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
+++ b/vlc-android/src/org/videolan/vlc/widget/AnimatedCoverView.java
@@ -22,6 +22,7 @@ package org.videolan.vlc.widget;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
+import android.graphics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
@@ -108,7 +109,9 @@ public class AnimatedCoverView extends View {
Rect src = new Rect(0, 0, mImage.getWidth(), mImage.getHeight());
Rect dst = new Rect((int)pt[0], (int)pt[1], (int)pt[0] + scaledImageWidth, (int)pt[1] + scaledImageHeight);
- canvas.drawBitmap(mImage, src, dst, null);
+ Paint paint = new Paint();
+ paint.setFilterBitmap(true);
+ canvas.drawBitmap(mImage, src, dst, paint);
super.onDraw(canvas);
// Request another draw operation until time is up.
More information about the Android
mailing list