Add color-key transparency support for logo overlays

- Allow users to select a transparent color for logo images (watermarks) via UI (checkbox, color picker, preview).
- Apply color-key transparency in both System.Drawing and ImageSharp backends: specified color in logo is made fully transparent.
- Persist transparency settings in PicSettings and SettingsDto; bind to DataModel and UI controls.
- Update logo preview to reflect transparency in real time.
- Add option to select image processing library (System.Drawing or ImageSharp) in UI and settings.
- Fix bug in SettingsService parameter loading for int/double/DateTime.
- Fully integrate color-key transparency into image processing and settings serialization.
This commit is contained in:
MaddoScientisto 2026-02-15 11:13:23 +01:00
commit 8872080741
9 changed files with 732 additions and 168 deletions

View file

@ -168,6 +168,20 @@ namespace ImageCatalog_2.Models
[XmlElement("MarchioAggiungi")]
public bool AddLogo { get; set; }
// Color-key transparency settings
[JsonPropertyName("TransparentColor")]
[XmlElement("ColoreTrasparente")]
public string TransparentColor { get; set; } = "#FFFFFF";
[JsonPropertyName("UseTransparentColor")]
[XmlElement("UsaColoreTrasparente")]
public bool UseTransparentColor { get; set; } = false;
// Selected image processing library (e.g., "System.Graphics" or "ImageSharp")
[JsonPropertyName("ImageLibrary")]
[XmlElement("ImageLibrary")]
public string ImageLibrary { get; set; } = "System.Graphics";
// Options
[JsonPropertyName("ForceJpeg")]
[XmlElement("GeneraleForzaJpg")]