Hey Tom,
Interesting. :smiley:
FYI:
pngquant
and AdvanceCOMP
are also available via Macports.
-Chris
Hey Tom,
Interesting. :smiley:
FYI:
pngquant
and AdvanceCOMP
are also available via Macports.
-Chris
does this still exist?
Both seem to be outdated on Macports, advpng slightly (1.20 is current), pngquant horribly (2.6.0 is current!)
Yeowch! I'll see about tweaking the tails of the maintainers.
Thanks.
-Chris
advpng 1.20
is already in the pipeline (as of about 12 hours ago). It should be available for updating in the next few days if not sooner.
pngquant
is unknown at present, but I have a query out to the maintainer.
I'll file a ticket if I don't hear back from him, but in the meantime there's an OSX binary available on the pngquant
homepage.
-Chris
Hey Tom,
Nice job! Works perfectly, except the "Hand over to ImageOptim". I get the following error:
"/var/folders/99/xq_fy6n13092rqg5tssd7c200000gn/T/Keyboard-Maestro-Script-C12FF574-92C8-4753-A926-74E839B8556A: line 1: open: command not found"
ImageOptim is installed:
—
Cary
Just tested it here with Handing over to ImageOptim and it worked as usual.
What is disconcerning me is the “open: command not found” thingy in your post. Did you alter the macro (the bash script) in any way?
No, I haven’t changed anything.
—
Cary
So, what is the path to ImageOptime on your volume?
/Applications/ImageOptim.app
—
Cary
Weird. The same path here.
A (probably) stupid question:
[Edit 2016-04-22:]
The above comment was for the Enhanced Screenshot Macro. So, forget it.
You mean I selected a JPEG or TIFF? No, only PNG.
—
Cary
Please see my edited post above. I have to grab some sleep right now, you’ll here from m soon
Tom,
I found something strange. If I set the ENV_PATH variable = /usr/local/bin, all the shell scripts available in Keyboard Maestro cease to function. All of them return “xxx: command not found”. If I delete the ENV_PATH variable from the preferences, the shell scripts work again but, of course, PNG Optimizer ceases to function.
—
Cary
Cary, doing that removes the default paths to the other programs. If you set the ENV_PATH variable in the preferences, you need to include the base paths along with any additional paths. So you would set ENV_PATH
to be /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Tom: FYI if you want to update the top post, the AdvanceCOMP package, containing advpng
, can be installed with brew install AdvanceCOMP
. A good alternative to downloading the source and compiling it.
Great find! Thanks! I was already wondering why it was missing in Homebrew but I was too stupid to have a closer look at the repository…
[Edit:] A added your tipp to the post above and to the Enhanced Screenshot post. Thanks again.
I would put the the more “current” (specialized) local paths at the front, like this:
/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
Also available from Macports.
port info AdvanceCOMP
sudo port -v install AdvanceCOMP
Confirmed that it installs advancecomp v1.20
.
-Chris