diff --git a/src/org/thoughtcrime/securesms/util/BitmapUtil.java b/src/org/thoughtcrime/securesms/util/BitmapUtil.java index 9a9221958e..74c9f5f797 100644 --- a/src/org/thoughtcrime/securesms/util/BitmapUtil.java +++ b/src/org/thoughtcrime/securesms/util/BitmapUtil.java @@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.util; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; +import android.graphics.Bitmap.Config; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Color; @@ -135,6 +136,7 @@ public class BitmapUtil { options.inSampleSize = getScaleFactor(imageWidth, imageHeight, maxWidth, maxHeight, constrainedMemory); options.inJustDecodeBounds = false; + options.inPreferredConfig = constrainedMemory ? Config.RGB_565 : Config.ARGB_8888; InputStream is = new BufferedInputStream(data); Bitmap roughThumbnail = BitmapFactory.decodeStream(is, null, options);