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()