If file > 2.5 MB reduce size

This commit is contained in:
2026-02-25 07:37:11 +09:00
parent dfc1c557e0
commit 851772398c
+1 -1
View File
@@ -661,7 +661,7 @@ class MainViewModel : BaseViewModel, IFontResolver, ICanCheckShutdown
var info = new FileInfo(file.FilePath);
uint loadedImageWidth = 0;
uint loadedImageHeight = 0;
if (isHEIC || isWebp || isPNG)
if (isHEIC || isWebp || isPNG || (!isPDF && info.Length > 2.5 * 1024 * 1024 /* 2.5 MB */))
{
// Save image as jpg
var convertedDir = Path.Combine(folderPath, "converted");