Re: ImageMagick Problem
Re: ImageMagick Problem
- Subject: Re: ImageMagick Problem
- From: "Fleisher, Ken" <email@hidden>
- Date: Wed, 26 Sep 2007 17:27:42 -0400
- Thread-topic: ImageMagick Problem
Title: Re: ImageMagick Problem
Good catch! When I run the following from Terminal, now they all work.:
FleisherK:~ k-fleisher$ tiffutil -info ~/Desktop/test/242-142.tif
FleisherK:~ k-fleisher$ sips -g format ~/Desktop/test/242-142.tif
FleisherK:~ k-fleisher$ file ~/Desktop/test/242-142.tif
However, I still can't figure out how to trigger the same result from AppleScript:
-- Set up properties likely to be used in multiple commands
property pathToImageMagickLibraries : "export DYLD_LIBRARY_PATH=/usr/ImageMagick-6.3.5/lib;"
property pathToImageMagickCommands : "/usr/ImageMagick-6.3.5/bin/"
-- Build the shell command
set cmd to pathToImageMagickLibraries & pathToImageMagickCommands
set cmd to cmd & "identify -verbose "
set cmd to cmd & "~/Desktop/test/*.tif"
--display dialog cmd
-- Execute the command
do shell script cmd
-- Result
tell current application
do shell script "export DYLD_LIBRARY_PATH=/usr/ImageMagick-6.3.5/lib;/usr/ImageMagick-6.3.5/bin/identify -verbose ~/Desktop/test/*.tif"
"identify: no decode delegate for this image format `/Users/k-fleisher/Desktop/test/242-142.tif'."
Regarding your other comments, the whole reason for installing ImageMagick was because it gives me some information that I cannot get from the other utilities, in particular the block size for JPEG files. I’ll test the performance once I can get it up and running.
Okay, your last e-mail just came in about fixing the path in AppleScript. I tried the change you suggested and got the same result. My original code tried to get the posix path to the desktop, but when I tried to concatenate with the rest of the file path, there were quote marks inserted which messed it up. I couldn’t figure out how to make that work, so I just started trying to hard code the whole path just to see if I could get ImageMagick working first.
On 9/26/07 4:55 PM, "Steven D. Majewski" <email@hidden> wrote:
> Oops. You wrote: 'Desktop/test/...'
> I wrote: '/Desktop/test/...'
>
> You probably want 'Desktop/test...' or '~/Desktop/test/...'
> so that it's looking for the file in a subfolder of your Desktop folder.
>
> The leading '/' makes it look for a Desktop folder in the root
> directory.
>
> That's why it doesn't see ANY file.
--
Ken Fleisher
Photographer
Imaging & Visual Services
National Gallery of Art
Washington, D.C.
Phone: (202) 712-7471
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden