mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
#1438 Downsample large images and max out at 800px
This commit is contained in:
parent
48d51fcea8
commit
022592a574
1 changed files with 3 additions and 2 deletions
|
@ -59,7 +59,7 @@ public class ImageLoader {
|
|||
}
|
||||
|
||||
public PhotoToLoad displayImage(String url, ImageView imageView, float roundRadius, boolean cropSquare) {
|
||||
return displayImage(url, imageView, roundRadius, cropSquare, Integer.MAX_VALUE, false);
|
||||
return displayImage(url, imageView, roundRadius, cropSquare, imageView.getHeight(), false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -179,8 +179,9 @@ public class ImageLoader {
|
|||
if (!isUrlMapped(photoToLoad.imageView, photoToLoad.url)) return;
|
||||
|
||||
// callers frequently might botch this due to lazy view measuring
|
||||
// limit max dimensions to 800px
|
||||
if (photoToLoad.maxDimPX < 1) {
|
||||
photoToLoad.maxDimPX = Integer.MAX_VALUE;
|
||||
photoToLoad.maxDimPX = 800;
|
||||
}
|
||||
|
||||
// try from disk
|
||||
|
|
Loading…
Add table
Reference in a new issue