Resize webp images too

pull/214/head
M66B 2 years ago
parent 08dbfb2e09
commit 99d078f490

@ -5176,7 +5176,9 @@ public class FragmentCompose extends FragmentBase {
private static void resizeAttachment(Context context, EntityAttachment attachment, int resize) throws IOException { private static void resizeAttachment(Context context, EntityAttachment attachment, int resize) throws IOException {
File file = attachment.getFile(context); File file = attachment.getFile(context);
if (file.exists() /* upload cancelled */ && if (file.exists() /* upload cancelled */ &&
("image/jpeg".equals(attachment.type) || "image/png".equals(attachment.type))) { ("image/jpeg".equals(attachment.type) ||
"image/png".equals(attachment.type) ||
"image/webp".equals(attachment.type))) {
ExifInterface exifSaved; ExifInterface exifSaved;
try { try {
exifSaved = new ExifInterface(file); exifSaved = new ExifInterface(file);

Loading…
Cancel
Save