summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-05 18:50:18 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2020-11-06 15:52:32 +0100
commit909b43fb702b6eb77a481bdfbd2584ca53abbab0 (patch)
tree16c1095c6e555456f407f544ca3156c0fdd990ce
parent9e7c62406a7a232e8091f3be0b8e26de5da9552b (diff)
removed unused resizing of slide previews for wear
Not only was the result of the resize not used at all, resizing it to a square form-factor would have squished the image - the preview thumbnails generated by LibreOffice are 320x240… also use png as format - jpeg at thumbnail sizes doesn't really have a benefit
-rw-r--r--android/sdremote/mobile/src/full/java/org.libreoffice.impressremote/communication/CommunicationServiceWear.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/android/sdremote/mobile/src/full/java/org.libreoffice.impressremote/communication/CommunicationServiceWear.java b/android/sdremote/mobile/src/full/java/org.libreoffice.impressremote/communication/CommunicationServiceWear.java
index 9b7545c..0179d67 100644
--- a/android/sdremote/mobile/src/full/java/org.libreoffice.impressremote/communication/CommunicationServiceWear.java
+++ b/android/sdremote/mobile/src/full/java/org.libreoffice.impressremote/communication/CommunicationServiceWear.java
@@ -203,10 +203,9 @@ public class CommunicationServiceWear extends WearableListenerService {
if(data==null){
throw new IllegalArgumentException("Null byte array.");
}
- Bitmap bitmap =BitmapFactory.decodeByteArray(data, 0, data.length);
- Bitmap.createScaledBitmap(bitmap,150,150,false);
+ Bitmap bitmap = BitmapFactory.decodeByteArray(data, 0, data.length);
final ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
- bitmap.compress(Bitmap.CompressFormat.JPEG, 100, byteStream);
+ bitmap.compress(Bitmap.CompressFormat.PNG, 100, byteStream);
return Asset.createFromBytes(byteStream.toByteArray());
}