Fixed image resolution

This commit is contained in:
M66B 2020-09-08 13:40:32 +02:00
parent 944d2d1765
commit 53c668ee1c
1 changed files with 2 additions and 2 deletions

View File

@ -493,8 +493,8 @@ class ImageHelper {
}
Rect bounds = d.getBounds();
int w = Math.round(bounds.width() * scale);
int h = Math.round(bounds.height() * scale);
int w = Math.round(Helper.dp2pixels(view.getContext(), bounds.width()) * scale);
int h = Math.round(Helper.dp2pixels(view.getContext(), bounds.height()) * scale);
if (a.width == 0 && a.height != 0)
a.width = Math.round(a.height * w / (float) h);