Giter Site home page Giter Site logo

Comments (8)

pabloheimplatz avatar pabloheimplatz commented on July 17, 2024 1

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. ✅

from signynts-darkroom-shortcut.

Signynt avatar Signynt commented on July 17, 2024

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?

from signynts-darkroom-shortcut.

pabloheimplatz avatar pabloheimplatz commented on July 17, 2024

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.

from signynts-darkroom-shortcut.

Signynt avatar Signynt commented on July 17, 2024

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.

from signynts-darkroom-shortcut.

pabloheimplatz avatar pabloheimplatz commented on July 17, 2024

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...

from signynts-darkroom-shortcut.

pabloheimplatz avatar pabloheimplatz commented on July 17, 2024

Even the "Convert to tiff" workflow is working perfect. So it can't be anything with the access permissions...

from signynts-darkroom-shortcut.

Signynt avatar Signynt commented on July 17, 2024

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!

from signynts-darkroom-shortcut.

pabloheimplatz avatar pabloheimplatz commented on July 17, 2024

works (also directly from your new release). Thank you!

from signynts-darkroom-shortcut.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.