Downsize MB is now user-configurable

Probably doesn't matter most of the time since we resize down HEIC and PNG anyway...

Closes #7
This commit is contained in:
2026-03-03 09:39:09 +09:00
parent 03da58277e
commit 3e91edb457
4 changed files with 35 additions and 2 deletions
+10
View File
@@ -15,6 +15,7 @@ class Settings : ChangeNotifier
private bool _useDocnetPDFImageRendering;
private bool _saveOutputPdfInWorkingDir;
private string _outputPdfDir;
private decimal _imageResizeThreshold;
public Settings()
{
@@ -22,6 +23,7 @@ class Settings : ChangeNotifier
_useDocnetPDFImageRendering = true;
_saveOutputPdfInWorkingDir = true;
_outputPdfDir = "";
_imageResizeThreshold = 1.5m;
}
public Settings(Settings other)
@@ -30,6 +32,7 @@ class Settings : ChangeNotifier
_useDocnetPDFImageRendering = other.UseDocnetPDFImageRendering;
_saveOutputPdfInWorkingDir = other.SaveOutputPdfInWorkingDir;
_outputPdfDir = other.OutputPdfDir;
_imageResizeThreshold = other.ImageResizeThreshold;
}
[JsonInclude]
@@ -61,6 +64,13 @@ class Settings : ChangeNotifier
set { _outputPdfDir = value; NotifyPropertyChanged(); }
}
[JsonInclude]
public decimal ImageResizeThreshold
{
get => _imageResizeThreshold;
set { _imageResizeThreshold = value; NotifyPropertyChanged(); }
}
public static string GetSettingsFileName()
{
return "settings.json";