mirror of https://github.com/M66B/FairEmail.git
Reduce memory usage
This commit is contained in:
parent
6f8893ebec
commit
a3316c1aae
|
@ -325,7 +325,7 @@ public class HtmlHelper {
|
|||
return d;
|
||||
} else {
|
||||
Bitmap bm = Helper.decodeImage(attachment.getFile(view.getContext()),
|
||||
res.getDisplayMetrics().widthPixels * 2);
|
||||
res.getDisplayMetrics().widthPixels);
|
||||
if (bm == null) {
|
||||
Log.i("Image not decodable CID=" + cid);
|
||||
Drawable d = res.getDrawable(R.drawable.baseline_broken_image_24, theme);
|
||||
|
@ -400,7 +400,7 @@ public class HtmlHelper {
|
|||
Log.i("Download " + source);
|
||||
Bitmap bm;
|
||||
try (InputStream is = new URL(source).openStream()) {
|
||||
int scaleTo = res.getDisplayMetrics().widthPixels * 2;
|
||||
int scaleTo = res.getDisplayMetrics().widthPixels;
|
||||
int factor = 1;
|
||||
while (options.outWidth / factor > scaleTo)
|
||||
factor *= 2;
|
||||
|
|
Loading…
Reference in New Issue