Page 1 of 1
ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T13:12:45-07:00
by jmkinggg
Guys,
For the life of me I cannot figure out where to change the output directory of images converted with imagemagick.
I'm basically using automator and this script to change multipage tiffs out to jpegs
for f in "$@"
do
/opt/local/bin/convert '*.*' converted_%04d.jpeg
echo "$f"
done
It's sending the exported images to my user home directory.
So my questions!
Where do I change the directory these are going too? I want to either make a new directory on desktop or change the main output directory.
Should this be put in the script itself? If so what do I add to the script.
Also when running this services on the tiff files sometimes the services stops working randomly and won't run at all. Is there a reason for this? How do I fix this so it will always work? Should automator be setup as an application instead?
Thank you!
Imagemagick 6.9.9
mac osx sierra
Re: ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T13:18:18-07:00
by fmw42
Create a new directory. Then
Code: Select all
for f in "$@"
do
/opt/local/bin/convert '*.*' path2newdirectory/converted_%04d.jpeg
echo "$f"
done
Re: ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T13:28:08-07:00
by jmkinggg
Awesome! I've changed that but I'm still having an issue with the script not doing anything now. Is there a cache or something that needs to be cleared? I was working but stopped.
Re: ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T13:59:07-07:00
by snibgo
I know nothing about "automator", but what is the purpose of the "f" loop? It is echoed, but not used in the convert command.
Re: ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T14:10:07-07:00
by fmw42
If you want to process all images in a directory, Then it is easier to use mogrify. See
https://www.imagemagick.org/Usage/basics/#mogrify
How did you change your convert command? What path did you use to your new directory?
Re: ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T14:58:37-07:00
by jmkinggg
Thanks guys. I'm not familiar enough with the bash scripting. I simply want to make an app or service with automator that my office can use to convert multipage tiffs to jpegs and put them in a folder. The script works in terminal if the "*.*" is pointed at a specific file but when its in automator so the user can choose the files then it runs the script, automator just hangs and then the services icon in the top menu bar tops spinning then disappears. It's like right as automator sees the bash script it hangs and disappears. Any ideas would be greatly appreciated or someone else with experience in automator shell scripts or even maybe using an applescript to call the commands from terminal? Thanks!
in automator I'm basically making a service or an app then adding a run shell script and adding the following
/bin/bash
pass input as agruements
for f in "$@"
do
/opt/local/bin/convert '*.*' Users/nestedsales/Desktop/Conversions/converted_%04d.jpeg
echo "$f"
done
if someone wanted to try it themselves, just make a multipage tiff thats about 2.0mb in size or whatever.
Or is there any other suggestions on something that can run these scripts without having to use the terminal directly?
Needs to be very simple for a very basic computer skill person to use. Just select all the files and add them to an app or right click on them and run a service.
Thanks again.
Re: ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T15:10:18-07:00
by Bonzo
Not that this is of much direct help with your problem but on Windows I have a batch script on the desktop and I just drag and drop my file onto the icon and it is converted.
Is there a similar option on a mac?
Re: ImageMagick 6.9.9 HELP!!
Posted: 2018-02-25T15:14:35-07:00
by fmw42
Perhaps it should be /Users not Users
/opt/local/bin/convert '*.*' /Users/nestedsales/Desktop/Conversions/converted_%04d.jpeg