magick.exe debugging problem

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
chris_s
Posts: 4
Joined: 2017-05-10T16:11:22-07:00
Authentication code: 1151

magick.exe debugging problem

Post 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?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: magick.exe debugging problem

Post 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/
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: magick.exe debugging problem

Post 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).
snibgo's IM pages: im.snibgo.com
chris_s
Posts: 4
Joined: 2017-05-10T16:11:22-07:00
Authentication code: 1151

Re: magick.exe debugging problem

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: magick.exe debugging problem

Post 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.
snibgo's IM pages: im.snibgo.com
chris_s
Posts: 4
Joined: 2017-05-10T16:11:22-07:00
Authentication code: 1151

Re: magick.exe debugging problem

Post 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.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: magick.exe debugging problem

Post by snibgo »

ImageMagick writes error messages to stderr. Consult your script language documentation to find how to access that.
snibgo's IM pages: im.snibgo.com
chris_s
Posts: 4
Joined: 2017-05-10T16:11:22-07:00
Authentication code: 1151

Re: magick.exe debugging problem

Post by chris_s »

Thanks. I'll do a bit of research.
Post Reply