From b99714161b48b276242d484cdeddfb3ef8aef4c4 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Fri, 18 Mar 2016 17:19:37 +0100 Subject: Fixes FS#167: Resized images are larger than original images --- .../de/thedevstack/conversationsplus/persistance/FileBackend.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance') diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java index 611f573c..07537fe3 100644 --- a/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java +++ b/src/main/java/de/thedevstack/conversationsplus/persistance/FileBackend.java @@ -110,7 +110,7 @@ public class FileBackend { } public static DownloadableFile compressImageAndCopyToPrivateStorage(Message message, Bitmap scaledBitmap) throws FileCopyException { - message.setRelativeFilePath(FileBackend.getPrivateImageDirectoryPath() + message.getUuid() + ".png"); + message.setRelativeFilePath(FileBackend.getPrivateImageDirectoryPath() + message.getUuid() + ".jpg"); DownloadableFile file = getFile(message); file.getParentFile().mkdirs(); OutputStream os = null; @@ -118,7 +118,7 @@ public class FileBackend { file.createNewFile(); os = new FileOutputStream(file); - boolean success = scaledBitmap.compress(Bitmap.CompressFormat.PNG, 75, os); + boolean success = scaledBitmap.compress(Bitmap.CompressFormat.JPEG, 75, os); if (!success) { throw new FileCopyException(R.string.error_compressing_image); } -- cgit v1.2.3