Buffer all file streams

This commit is contained in:
M66B
2019-01-16 13:42:17 +00:00
parent 9275b6e14f
commit 84fbfaf76e
5 changed files with 43 additions and 33 deletions

View File

@@ -1328,9 +1328,9 @@ public class FragmentCompose extends FragmentBase {
Log.i("Image target size=" + scaled.getWidth() + "x" + scaled.getHeight());
FileOutputStream out = null;
OutputStream out = null;
try {
out = new FileOutputStream(file);
out = new BufferedOutputStream(new FileOutputStream(file));
scaled.compress("image/jpeg".equals(attachment.type)
? Bitmap.CompressFormat.JPEG
: Bitmap.CompressFormat.PNG,