mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-31 14:17:03 +02:00
Fixed image scaling
This commit is contained in:
@@ -280,7 +280,10 @@ public class HtmlHelper {
|
||||
is = new URL(source).openStream();
|
||||
|
||||
int scaleTo = context.getResources().getDisplayMetrics().widthPixels;
|
||||
int factor = Math.min(options.outWidth / scaleTo, options.outWidth / scaleTo);
|
||||
int factor = 1;
|
||||
while (options.outWidth / factor > scaleTo)
|
||||
factor *= 2;
|
||||
|
||||
if (factor > 1) {
|
||||
Log.i("Download image factor=" + factor);
|
||||
options.inJustDecodeBounds = false;
|
||||
|
||||
Reference in New Issue
Block a user