Image editor: fixed file size

This commit is contained in:
M66B
2025-01-07 19:54:54 +01:00
parent 7a28718992
commit 1ebb8e79ad

View File

@@ -126,6 +126,8 @@ public class FragmentDialogEditImage extends FragmentDialogBase {
bm.compress(Bitmap.CompressFormat.PNG, ImageHelper.DEFAULT_PNG_COMPRESSION, os);
}
long len = file.length();
if (attachment.name != null) {
int index = attachment.name.lastIndexOf(".");
if (index > 0) {
@@ -139,7 +141,7 @@ public class FragmentDialogEditImage extends FragmentDialogBase {
}
}
db.attachment().setName(id, attachment.name, "image/png", file.length());
db.attachment().setName(id, attachment.name, "image/png", len);
return null;
}