If file > 2.5 MB reduce size
This commit is contained in:
@@ -661,7 +661,7 @@ class MainViewModel : BaseViewModel, IFontResolver, ICanCheckShutdown
|
|||||||
var info = new FileInfo(file.FilePath);
|
var info = new FileInfo(file.FilePath);
|
||||||
uint loadedImageWidth = 0;
|
uint loadedImageWidth = 0;
|
||||||
uint loadedImageHeight = 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
|
// Save image as jpg
|
||||||
var convertedDir = Path.Combine(folderPath, "converted");
|
var convertedDir = Path.Combine(folderPath, "converted");
|
||||||
|
|||||||
Reference in New Issue
Block a user