1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-02-23 06:31:17 +00:00

Fixed showing data uri images with a size

This commit is contained in:
M66B 2021-07-02 15:23:30 +02:00
parent 22ec31c2b0
commit 9fdaae3a65

View file

@ -315,8 +315,8 @@ class ImageHelper {
if (data && (show || inline || a.tracking)) if (data && (show || inline || a.tracking))
try { try {
int scaleToPixels = res.getDisplayMetrics().widthPixels; int scaleToPixels = res.getDisplayMetrics().widthPixels;
ByteArrayInputStream bis = getDataUriStream(source); ByteArrayInputStream bis = getDataUriStream(a.source);
Bitmap bm = getScaledBitmap(bis, source, scaleToPixels); Bitmap bm = getScaledBitmap(bis, a.source, scaleToPixels);
if (bm == null) if (bm == null)
throw new IllegalArgumentException("decode byte array failed"); throw new IllegalArgumentException("decode byte array failed");