mirror of https://github.com/M66B/FairEmail.git
Workaround invalid width/heigth specifications (disabled)
This commit is contained in:
parent
a0729d7164
commit
4a09988d66
|
@ -502,8 +502,9 @@ class ImageHelper {
|
||||||
a.height = Math.round(a.width * h / (float) w);
|
a.height = Math.round(a.width * h / (float) w);
|
||||||
|
|
||||||
if (a.width != 0 && a.height != 0) {
|
if (a.width != 0 && a.height != 0) {
|
||||||
w = Math.round(Helper.dp2pixels(view.getContext(), a.width) * scale);
|
boolean swap = ((w > h) != (a.width > a.height)) && false;
|
||||||
h = Math.round(Helper.dp2pixels(view.getContext(), a.height) * scale);
|
w = Math.round(Helper.dp2pixels(view.getContext(), swap ? a.height : a.width) * scale);
|
||||||
|
h = Math.round(Helper.dp2pixels(view.getContext(), swap ? a.width : a.height) * scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
float width = view.getContext().getResources().getDisplayMetrics().widthPixels;
|
float width = view.getContext().getResources().getDisplayMetrics().widthPixels;
|
||||||
|
|
Loading…
Reference in New Issue