Skip to content

Commit 29614ae

Browse files
committed
feat: Do not scale images down by a small amount
1 parent 691535c commit 29614ae

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/blob.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,9 @@ impl<'a> BlobObject<'a> {
449449
max_wh
450450
};
451451

452-
if target_wh > n_px_longest_side {
452+
if target_wh > n_px_longest_side
453+
|| !is_avatar && target_wh > (f64::from(n_px_longest_side) * 0.98) as u32
454+
{
453455
target_wh = n_px_longest_side;
454456
};
455457

0 commit comments

Comments
 (0)