[Android] Store bitmaps in JPEG instead of PNG.

Ludovic Fauvet git at videolan.org
Mon Oct 15 17:45:40 CEST 2012


vlc-ports/android | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Oct 15 17:42:24 2012 +0200| [a53f8e68dc3a55ceef85e2ecca52c547d31c5588] | committer: Ludovic Fauvet

Store bitmaps in JPEG instead of PNG.

With a gain of ~70% in size.

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=a53f8e68dc3a55ceef85e2ecca52c547d31c5588
---

 vlc-android/src/org/videolan/vlc/DatabaseManager.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/DatabaseManager.java b/vlc-android/src/org/videolan/vlc/DatabaseManager.java
index 798d577..65e6340 100644
--- a/vlc-android/src/org/videolan/vlc/DatabaseManager.java
+++ b/vlc-android/src/org/videolan/vlc/DatabaseManager.java
@@ -473,7 +473,7 @@ public class DatabaseManager {
                 if (object != null) {
                     Bitmap picture = (Bitmap) object;
                     ByteArrayOutputStream out = new ByteArrayOutputStream();
-                    picture.compress(Bitmap.CompressFormat.PNG, 100, out);
+                    picture.compress(Bitmap.CompressFormat.JPEG, 90, out);
                     values.put(MEDIA_PICTURE, out.toByteArray());
                 }
                 else {



More information about the Android mailing list