Skip to content

Commit

Permalink
add --lut-hue-sat option when lut is used
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomson committed Apr 16, 2024
1 parent 120d6c6 commit a70cf9c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions options/processing_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,9 +758,9 @@ func applyDitherOption(po *ProcessingOptions, args []string) error {
case "nc":
po.Dither.NormalizeContrast = true
case "llab13":
po.Dither.LUTFile = "lab_13_hack.interpol_clarabel.npy"
po.Dither.LUTFile = "lab_13_hack.interpol_clarabel"
case "lrgb13":
po.Dither.LUTFile = "rgb_13.interpol_clarabel.npy"
po.Dither.LUTFile = "rgb_13.interpol_clarabel"
default:
if err := maybeParseNumericDitherOptions(po, arg); err != nil {
return err
Expand Down
4 changes: 3 additions & 1 deletion processing/dither.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ func shellOutDither(inFile string, po *options.ProcessingOptions) error {
cmdArgs = append(cmdArgs, "--hull-project")
}
if len(po.Dither.LUTFile) > 0 {
cmdArgs = append(cmdArgs, "--lut", fmt.Sprintf("lut_dither/%s", po.Dither.LUTFile))
cmdArgs = append(cmdArgs, "--lut", fmt.Sprintf("lut_dither/%s.npy", po.Dither.LUTFile))
// the precomputed hue-sat, a speed optimization, is in the base dir
cmdArgs = append(cmdArgs, "--lut-hue-sat", fmt.Sprintf("%s.hue_sat", po.Dither.LUTFile))
}
if po.Dither.LUTBlue {
cmdArgs = append(cmdArgs, "--lut-blue")
Expand Down

0 comments on commit a70cf9c

Please sign in to comment.