mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 14:03:43 +08:00
Xu ly dong bo nguoi dung thanh cong
This commit is contained in:
@@ -35,10 +35,10 @@ export function compressImage(file: Blob, maxSize: number): Promise<string> {
|
||||
if (dataUrl.length < maxSize) break;
|
||||
|
||||
if (quality > 0.5) {
|
||||
// Prioritize quality reduction
|
||||
// Ưu tiên giảm chất lượng
|
||||
quality -= 0.1;
|
||||
} else {
|
||||
// Then reduce the size
|
||||
// Sau đó giảm kích thước
|
||||
width *= 0.9;
|
||||
height *= 0.9;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user