From 8dcd16ff16df595749f6d56309e5f1243dc23de0 Mon Sep 17 00:00:00 2001 From: bobi Date: Tue, 3 Mar 2026 02:17:11 -0500 Subject: [PATCH] Refactor image converter settings in configuration files --- .../appsettings.Development.json | 18 +++++++++++++++++- docker/custom-settings.json | 17 ++++++++++------- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/WsdScanService.Host/appsettings.Development.json b/WsdScanService.Host/appsettings.Development.json index 48e63d4..c54e056 100644 --- a/WsdScanService.Host/appsettings.Development.json +++ b/WsdScanService.Host/appsettings.Development.json @@ -15,7 +15,23 @@ "OutputDir": "./tmp/wsdscan", "Sane": { "UseSaneBackend": true, - "Device": "pixma:MF220_{Ip}" + "Device": "pixma:MF220_{Ip}", + "ImageConverter": { + "Path": "magick", + "Args": [ + "JPG:{InputPath}", + "-gamma", + "2.2", + "-quality", + "92", + "-sampling-factor", + "4:2:0", + "-interlace", + "Plane", + "-strip", + "JPG:{OutputPath}" + ] + } }, "ScanProfiles": [ { diff --git a/docker/custom-settings.json b/docker/custom-settings.json index 7d74fa2..e64dc64 100644 --- a/docker/custom-settings.json +++ b/docker/custom-settings.json @@ -3,18 +3,21 @@ "OutputDir": "/app/scans", "Sane": { "UseSaneBackend": true, - "Format": "pnm", "Device": "pixma:MF220_{Ip}", "ImageConverter": { "Path": "magick", "Args": [ - "PNM:${InputPath}", - "-gamma 2.2", - "-quality 92", - "-sampling-factor 4:2:0", - "-interlace Plane", + "JPG:{InputPath}", + "-gamma", + "2.2", + "-quality", + "92", + "-sampling-factor", + "4:2:0", + "-interlace", + "Plane", "-strip", - "JPG:${OutputPath}" + "JPG:{OutputPath}" ] } },