Added option for automatically resizing of images

This commit is contained in:
M66B
2019-01-12 08:07:06 +00:00
parent 78e2b232d6
commit 9a8b9bb8f2
5 changed files with 32 additions and 5 deletions

View File

@@ -1312,7 +1312,10 @@ public class FragmentCompose extends FragmentEx {
}
}
if (image &&
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
boolean autoresize = prefs.getBoolean("autoresize", true);
if ((image || autoresize) &&
("image/jpeg".equals(attachment.type) || "image/png".equals(attachment.type))) {
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;