From 643347c2d68adcddf6a6305add793d8075bd9fb2 Mon Sep 17 00:00:00 2001 From: James Tomson Date: Mon, 6 May 2024 16:35:46 -0400 Subject: [PATCH 1/2] create "options set 01" parameters to shorten turnaround --- options/processing_options.go | 3 +++ plugins/pushd-dither | 2 +- processing/dither.go | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/options/processing_options.go b/options/processing_options.go index a153d99f42..aa4fd57eeb 100644 --- a/options/processing_options.go +++ b/options/processing_options.go @@ -79,6 +79,7 @@ type DitherOptions struct { SaturationScale float64 NormalizeContrast bool CLAHESize int + OptionsSet01 bool // shorthand for a set of options starting with the 20240506 release } type WatermarkOptions struct { @@ -763,6 +764,8 @@ func applyDitherOption(po *ProcessingOptions, args []string) error { po.Dither.LUTFile = "rgb_13.interpol_clarabel" case "hpmrgb": po.Dither.LUTFile = "hpminde_rgb" + case "opts01": + po.Dither.OptionsSet01 = true // shorthand for a set of options starting with the 20240506 release default: if err := maybeParseNumericDitherOptions(po, arg); err != nil { return err diff --git a/plugins/pushd-dither b/plugins/pushd-dither index df8d5e9b3b..91ae8acb4c 160000 --- a/plugins/pushd-dither +++ b/plugins/pushd-dither @@ -1 +1 @@ -Subproject commit df8d5e9b3babfad36dee2ef49dc0f3a8ba3a782a +Subproject commit 91ae8acb4c32cf8439310036c193f94a2642a8da diff --git a/processing/dither.go b/processing/dither.go index 4262daefb5..af85f3d7bf 100644 --- a/processing/dither.go +++ b/processing/dither.go @@ -146,6 +146,16 @@ func shellOutDither(inFile string, po *options.ProcessingOptions) error { cmdArgs = append(cmdArgs, "--normalize-contrast") } + if po.Dither.OptionsSet01 { + cmdArgs = append(cmdArgs, "--cam16") + cmdArgs = append(cmdArgs, "--chroma-lightness") + cmdArgs = append(cmdArgs, "--saturation-scale", "1.0") + cmdArgs = append(cmdArgs, "--hull-project") + cmdArgs = append(cmdArgs, "--pal-meter-13-hack") + cmdArgs = append(cmdArgs, "--contrast") + cmdArgs = append(cmdArgs, "--shrink-gamut", "2.0") + } + cmd := exec.Command("python3", cmdArgs...) cmd.Dir = "/opt/pushd-dither" output, err := cmd.CombinedOutput() From 8652b2c52df0fd26bf9ad6e8bb854b46280cec6c Mon Sep 17 00:00:00 2001 From: James Tomson Date: Tue, 7 May 2024 11:05:16 -0400 Subject: [PATCH 2/2] tune --- processing/dither.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processing/dither.go b/processing/dither.go index af85f3d7bf..b96a55ce81 100644 --- a/processing/dither.go +++ b/processing/dither.go @@ -153,7 +153,7 @@ func shellOutDither(inFile string, po *options.ProcessingOptions) error { cmdArgs = append(cmdArgs, "--hull-project") cmdArgs = append(cmdArgs, "--pal-meter-13-hack") cmdArgs = append(cmdArgs, "--contrast") - cmdArgs = append(cmdArgs, "--shrink-gamut", "2.0") + cmdArgs = append(cmdArgs, "--shrink-gamut", "1.5") } cmd := exec.Command("python3", cmdArgs...)