Page 1 of 1

magick.exe debugging problem

Posted: 2017-05-10T16:14:33-07:00
by chris_s
I am trying to use magick to correct image distortion. I probably have an error in my syntax. I need to keep the command window open after the program executes so I can see any error messages. How do I do that?

Re: magick.exe debugging problem

Posted: 2017-05-10T16:17:13-07:00
by fmw42
Please always provide your IM version and platform (presumed windows) with any questions. Also your exact command line. That way we may be able to help. I do not use Windows, so cannot tell you about keeping the CMD window open. But I might be able to spot some error in you command. Others can help you further on Windows specific activities.

See the top-most post in this forum "IMPORTANT: Please Read This FIRST Before Posting" at viewtopic.php?f=1&t=9620

For novices, see

viewtopic.php?f=1&t=9620
http://www.imagemagick.org/script/comma ... essing.php
http://www.imagemagick.org/Usage/reference.html
http://www.imagemagick.org/Usage/

Re: magick.exe debugging problem

Posted: 2017-05-10T17:00:02-07:00
by snibgo
chris_s wrote:I need to keep the command window open after the program executes so I can see any error messages.
Is this on Windows?

I use Windows 8.1. I start up a command window. (Actually, about 10 windows, at the start of the day.) Then I run commands in windows by typing them. Some commands run an IM program, but most commands run scripts. At the end of the day, I close the windows.

There are other ways of running commands that (a) opens a window and (b) runs a command and (c) immediately closes the window. I sometimes do that, for special purposes, but not often. Those methods need to have specialist error-handling (eg to log files).

Re: magick.exe debugging problem

Posted: 2017-05-10T18:59:35-07:00
by chris_s
magick.exe version is 7.0.1
This is running on Windows 7.
I am executing magick using a ShellExecuteWait from another program.
The command line is:
convert "F:\Develop\Autoit\App_RNS_Feb2017\sample_images\barrel_dist_18-55.tiff" -distort barrel '0.00491 -0.00114 0.01427' "F:\Develop\Autoit\App_RNS_Feb2017\sample_images\barrel_dist_corr.tiff"

If there is an error in the command line and someone can point that out, it will solve the immediate issue. I do also need to know how to get the messages from magick for the future.

Re: magick.exe debugging problem

Posted: 2017-05-10T19:24:03-07:00
by snibgo
ShellExecuteWait is from AutoIt. Is that what you are using? I know nothing about that. See their documentation.

I suspect you have a quoting problem. I suggest you remove the single-quotes around the three numbers, and separate the numbers with commas instead of spaces.

Re: magick.exe debugging problem

Posted: 2017-05-10T23:19:33-07:00
by chris_s
I removed the quotes and replaced the spaces with commas and it now seems to function. Thank you for that.

Would still like to know how to get error info from Magick.

Re: magick.exe debugging problem

Posted: 2017-05-11T05:25:21-07:00
by snibgo
ImageMagick writes error messages to stderr. Consult your script language documentation to find how to access that.

Re: magick.exe debugging problem

Posted: 2017-05-11T08:13:12-07:00
by chris_s
Thanks. I'll do a bit of research.