diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-09-27 20:08:49 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-09-27 20:08:49 +0200 |
commit | 5b9784a7898451ad867ba1e25d151a6b6d97da8d (patch) | |
tree | 51b9265dd332ecdf8f61e1b7864b7cd1450b1f17 /src/main/java/de/pixart/messenger/services/XmppConnectionService.java | |
parent | f67821752d81253478ac248e62482d6d89427e41 (diff) |
do not compress/resize images with strange aspect ratios
Diffstat (limited to 'src/main/java/de/pixart/messenger/services/XmppConnectionService.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 396a68446..132ede7b6 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -522,7 +522,8 @@ public class XmppConnectionService extends Service { if ("never".equals(compressPictures) || ("auto".equals(compressPictures) && getFileBackend().useImageAsIs(uri)) - || (mimeType != null && mimeType.endsWith("/gif"))) { + || (mimeType != null && mimeType.endsWith("/gif")) + || getFileBackend().unusualBounds(uri)) { Log.d(Config.LOGTAG, conversation.getAccount().getJid().asBareJid() + ": not compressing picture. sending as file"); attachFileToConversation(conversation, uri, mimeType, callback); return; |