mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
@@ -398,14 +398,13 @@ impl<'a> BlobObject<'a> {
|
|||||||
cause: err,
|
cause: err,
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
let (img_wh, _quality) =
|
let img_wh = if MediaQuality::from_i32(context.get_config_int(Config::MediaQuality).await)
|
||||||
if MediaQuality::from_i32(context.get_config_int(Config::MediaQuality).await)
|
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
== MediaQuality::Balanced
|
== MediaQuality::Balanced
|
||||||
{
|
{
|
||||||
(BALANCED_IMAGE_SIZE, BALANCED_IMAGE_QUALITY)
|
BALANCED_IMAGE_SIZE
|
||||||
} else {
|
} else {
|
||||||
(WORSE_IMAGE_SIZE, WORSE_IMAGE_QUALITY)
|
WORSE_IMAGE_SIZE
|
||||||
};
|
};
|
||||||
|
|
||||||
if img.width() <= img_wh && img.height() <= img_wh {
|
if img.width() <= img_wh && img.height() <= img_wh {
|
||||||
|
|||||||
Reference in New Issue
Block a user