Closed pabloheimplatz closed 2 years ago
Hmm, that's a weird issue. What version of imagemagick do you have installed? It shouldn't be an M1 issue, I made the script on a Mac Mini M1.
Can you also run negfix8
on a test file as well?
negfix8
is also running.
imagemagick is in version 7.1.0-18
installed via brew.
Thanks for the M1 info. I'll also debug it further this afternoon. Maybe it's some access errors on my Download folder or something like this.
Just to make sure: is it the Q16-HDRI version of Imagemagick? It's very weird, because it seems like the individual components work fine...
Try running the shell commands from the workflow manually, and see if you get an error with them:
export PATH="/usr/local/bin:$PATH"
for f in "$@"
do
cd "$(dirname "$f")"
negfix8 -cs $f "${f%.tif}-negfix8.tif"
autolevel "${f%.tif}-negfix8.tif" "${f%.tif}-autolevel.tif"
autocolor "${f%.tif}-autolevel.tif" "${f%.tif}-InvertedSimple.tif"
magick -quiet $f -delete 0 -normalize "${f%.tif}-ir.tif"
magick -quiet $f -channel 0 -separate -normalize "${f%.tif}-red.tif"
magick -quiet "${f%.tif}-ir.tif" "${f%.tif}-red.tif" -fx 'u/v' -threshold 1% "${f%.tif}-Dust.tif"
magick "${f%.tif}-InvertedSimple.tif" "${f%.tif}-Dust.tif" -channel-fx '|gray=>alpha' "${f%.tif}-Inverted.tif"
rm "${f%.tif}-negfix8.tif"
rm "${f%.tif}-autolevel.tif"
rm "${f%.tif}-ir.tif"
rm "${f%.tif}-red.tif"
rm "${f%.tif}-InvertedSimple.tif"
rm "${f%.tif}-Dust.tif"
done
You'll need to edit the commands to replace the variables with the file names. Perhaps the issue has to do with the permissions of Automator? Check what permissions it has in the Privacy section of System Preferences.
Weird. All steps are working perfectly if I set $f
to Example.tif
.
convert -version
returns also the current and correct version.
Must be something with the permissions... I can't find anything. Even after add the Automator to "Full Disk Access" nothing changed...
Even the "Convert to tiff" workflow is working perfect. So it can't be anything with the access permissions...
Got it! I changed the first line in your script.
Previously it was export PATH="/usr/local/bin:$PATH"
I changed it to source ~/.zshrc
I'm unsure why I needed this on my system, because in my zsh config I also exported the $PATH
to /usr/local/bin
.
But now everything is working.
For everyone else, you can edit the workflow by right click it and say "open with automator" -> edit -> safe -> double click on it -> run in from finder in your file. ✅
Can you do me a favor and see if the workflow works for you if it starts like this?
source ~/.zshrc
export PATH="/usr/local/bin:$PATH"
So that it includes both source and export at the beginning.
Another user hasn't been able to get it to work without using source
, but on my system it doesn't work without using export
, so I'm trying to include both, on my systems the above combination works, but I want to make sure it also works for people who's systems requires source
to be included.
Thanks!
works (also directly from your new release). Thank you!
First off all thank you very much for this workflows!
Maybe I'm to tired but I can't figure out what is wrong. After I installed everything I got the following error message:
Firstly I thought it could be a M1 problem with the scripts. But
autolevel
andautocolor
for example are working if I start them from the terminal on an example. Also theconvert
command is working in my terminal. Maybe I'll found tomorrow a solution. I'll update my Issue here. :)