From c283fec0d1af6d4dc8c6b794a065fa1029b6d178 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 26 Apr 2015 20:26:59 +0200 Subject: [PATCH] hard code bitmap configs --- .../java/eu/siacs/conversations/persistance/FileBackend.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index cb79b0e96..ac169180b 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -412,7 +412,7 @@ public class FileBackend { float top = (newHeight - scaledHeight) / 2; RectF targetRect = new RectF(left, top, left + scaledWidth, top + scaledHeight); - Bitmap dest = Bitmap.createBitmap(newWidth, newHeight, source.getConfig()); + Bitmap dest = Bitmap.createBitmap(newWidth, newHeight, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(dest); canvas.drawBitmap(source, null, targetRect, null); return dest; @@ -437,7 +437,7 @@ public class FileBackend { float top = (size - outHeight) / 2; RectF target = new RectF(left, top, left + outWidth, top + outHeight); - Bitmap output = Bitmap.createBitmap(size, size, input.getConfig()); + Bitmap output = Bitmap.createBitmap(size, size, Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(output); canvas.drawBitmap(input, null, target, null); return output;