Signynt / signynts-darkroom-shortcut

A one-click workflow for film negative inversion with dust or scratch removal
MIT License
35 stars 4 forks source link

Problems with negfix8 and autolevels, BW-version works fine.. #6

Closed GaneshQBNA closed 2 years ago

GaneshQBNA commented 2 years ago

Thank you for the tool, I was very excited to try it out. However I can not get it to work, I get the following error message:

Bei der Aktion „Shell-Skript ausführen“ ist ein Fehler aufgetreten: „/Users/ganeshkubina/.zshrc:export:1: not valid in this context: Fusion.app/Contents/Public:/Library/Apple/usr/bin convert: For function 'min' expected 2 arguments, found too few (0) at '' @ error/fx.c/GetFunction/1857. convert: For function 'max' expected 2 arguments, found too few (0) at '' @ error/fx.c/GetFunction/1857. convert: For function 'max' expected 2 arguments, found too few (0) at '' @ error/fx.c/GetFunction/1857. convert: For function 'max' expected 2 arguments, found too few (0) at '' @ error/fx.c/GetFunction/1857. convert: For function 'max' expected 2 arguments, found too few (0) at '' @ error/fx.c/GetFunction/1857. convert: For function 'max' expected 2 arguments, found too few (0) at '' @ error/fx.c/GetFunction/1857. convert: For function 'max' expected 2 arguments, found too few (0) at '' @ error/fx.c/GetFunction/1857. convert: Expected operand at '/)^(1/2.15))Quantum...' @ error/fx.c/GetOperand/2298. convert: Empty expression in parentheses at '/)^(1/2.15))Quantum...' @ error/fx.c/GetOperand/2033. convert: Empty expression in parentheses at '/)^(1/2.15))Quantum...' @ error/fx.c/GetOperand/2033. convert: Expected operand at '/)/log(/)' @ error/fx.c/GetOperand/2298. convert: For function 'log' expected 1 arguments, found too few (0) at '/)/log(/)' @ error/fx.c/GetFunction/1857. convert: Expected operand at '/)/log(/)' @ error/fx.c/GetOperand/2298. convert: For function 'log' expected 1 arguments, found too few (0) at '/)/log(/)' @ error/fx.c/GetFunction/1857. convert: Empty expression in parentheses at '/)^(1/2.15))Quantum...' @ error/fx.c/GetOperand/2033. convert: Empty expression in parentheses at '/)^(1/2.15))*Quantum...' @ error/fx.c/GetOperand/2033. convert: Expected operand at '/)/log(/)' @ error/fx.c/GetOperand/2298. convert: For function 'log' expected 1 arguments, found too few (0) at '/)/log(/)' @ error/fx.c/GetFunction/1857. convert: Expected operand at '/)/log(/)' @ error/fx.c/GetOperand/2298. convert: For function 'log' expected 1 arguments, found too few (0) at '/)/log(/)' @ error/fx.c/GetFunction/1857. convert: invalid argument for option '-gamma': ) @ error/convert.c/ConvertImageCommand/1726. convert: unable to open image '/Users/ganeshkubina/Downloads/Example-negfix8.tif': No such file or directory @ error/blob.c/OpenBlob/3527. convert: no images defined `./autolevel_1_31957.mpc' @ error/convert.c/ConvertImageCommand/3325.

autolevel:

USAGE: autolevel [-c colormode] [-m midrange] infile outfile USAGE: autolevel [-h or -help]

OPTIONS:

-c colormode colorspace/channel to use to compute min, max, gamma statistics; choices are: gray, intensity, luminance, lightness, brightness, average, magnitude, rgb; default=luminance -m midrange midrange value for autogamma part of script; 0<float<1; default=0.5

convert: unable to open image '/Users/ganeshkubina/Downloads/Example-autolevel.tif': No such file or directory @ error/blob.c/OpenBlob/3527. convert: no images defined `./autocolor_1_31966.mpc' @ error/convert.c/ConvertImageCommand/3325.

autocolor:

USAGE: autocolor [-m method] [-c clipmode] [-l cliplow] [-h cliphigh] [-n neutralgray] infile outfile USAGE: autocolor [-help]

OPTIONS:

-m method method to adjust neutral color; method=gamma, recolor, none; default=recolor -c clipmode clip channels mode; clip=together or separate; default=separate -l cliplow clip percent on low end of histogram; float; 0<=cliplow<=100; default=0.1 -h cliphigh clip percent on high end of histogram; float; 0<=cliphigh<=100; default=same as cliplow -n neutralgray neutral gray value (percent); float between 0 and 100; default=mean of luminance

rm: /Users/ganeshkubina/Downloads/Example-negfix8.tif: No such file or directory rm: /Users/ganeshkubina/Downloads/Example-autolevel.tif: No such file or directory“

When I try to use negfix8 and autolevel in the terminal I also get errors. The BW-shortcut works well though, I guess because it only uses ImageMagick.

Hope you can help!

Signynt commented 2 years ago

Hey, let's see if we can get this working for you. Have you already tried the fix for the most common error people run into, that's at the bottom of the Installation instructions?

Important: If you get an error while trying to use the shortcut, one of the most common reasons this can be caused is a messed up $PATH. To fix this, open the Terminal and run this command:

echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc

Close the Terminal and try the shortcut again, in most cases it will work now.

I'd try this first, and if it's still not working also check that Automator has full accessibility and disk permissions in System Preferences.

GaneshQBNA commented 2 years ago

I already used that command (had a different error before) and Automator has all the permissions. In the meantime I found the reason for this:

Bei der Aktion „Shell-Skript ausführen“ ist ein Fehler aufgetreten: „/Users/ganeshkubina/.zshrc:export:1: not valid in this context: Fusion.app/Contents/Public:/Library/Apple/usr/bin

which was left from an old install of VMware-Fusion in the zshrc-file. I deleted that but the errors from below still remain and I get the same errors when using negfix-8 via Terminal.

Signynt commented 2 years ago

Hold on, that /bin path seems suspicious. Why is it in the Fusion.app? Can you manually navigate to your usr/bin folder and confirm if you've put negfix and the other scripts in the right place?

Copy pasted from one of my YT comments:

Try to navigate there manually:

  1. Go to the highest level, so that you see your "Macintosh HD" drive, and open it (You should see "Applications", "Library", "System" and "Users"
  2. Press Cmd + Shift + period to show hidden files. Now you should see a bunch of extra folders pop up
  3. Open the "usr" folder
  4. Open the "local" folder
  5. Open the "bin" folder
GaneshQBNA commented 2 years ago

Like I said in my previous comment, the error about the Fusion.app is now solved. The app had left a command similar to your export PATH command in the same zshrc file. Negfix, Autocolor and Autolevels are in this path:

Bildschirmfoto 2022-02-14 um 16 01 37
Signynt commented 2 years ago

Finally fixed this issue, see #7 !