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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user