Help - How can I make convert echo a result after finish

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
y0gz

Help - How can I make convert echo a result after finish

Post by y0gz »

Hey, how can I make convert.exe echo a result to the cmd windows after it finishes the converting process?
cuongvt

Re: Help - How can I make convert echo a result after finish

Post by cuongvt »

display path_to_converted_file?
y0gz

Re: Help - How can I make convert echo a result after finish

Post by y0gz »

exactly? how can I do that without calling another command?
cuongvt

Re: Help - How can I make convert echo a result after finish

Post by cuongvt »

not sure what u meaned. But if I understand corectly:
convert aaa.jpg bbb.jpg
display bbb.jpg

is what you meaned?
regards
y0gz

Re: Help - How can I make convert echo a result after finish

Post by y0gz »

no man... I meant that whenever convert.exe finishes converting the file, it will output (echo) to the cmd the path of the file or something to let me know it succeeded
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help - How can I make convert echo a result after finish

Post by fmw42 »

y0gz wrote:no man... I meant that whenever convert.exe finishes converting the file, it will output (echo) to the cmd the path of the file or something to let me know it succeeded

add -monitor to your command line


see http://www.imagemagick.org/Usage/basics/#controls
y0gz

Re: Help - How can I make convert echo a result after finish

Post by y0gz »

Hey, thanks for the tip.. but -identify/-write info: are giving me the info for the source file, I would like the convert to print info about the target file after it has converted it... and if it fails it won't print anything/something else, the same as the vb.net com dll does...

any ideas?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Help - How can I make convert echo a result after finish

Post by fmw42 »

y0gz wrote:Hey, thanks for the tip.. but -identify/-write info: are giving me the info for the source file, I would like the convert to print info about the target file after it has converted it... and if it fails it won't print anything/something else, the same as the vb.net com dll does...

any ideas?

You could try piping the output

convert inputimage argument -write outputimage miff:- | identify -verbose -

outputimage and miff:- will be the same data. outputimage will be written to disk and miff:- will be piped to identify
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Help - How can I make convert echo a result after finish

Post by anthony »

Try adding -verbose

Code: Select all

convert rose: -verbose /tmp/r
rose:=> PNM 70x46 70x46+0+0 8-bit DirectClass 9.45kb
rose:=>/tmp/r ROSE 70x46 70x46+0+0 8-bit DirectClass 60.7kb


That last line of output give the output filename.

ASIDE: As I never specified a suffix or other format hint, IM chose to use the input format for the built-in image. C coding for a PNM image memory blob. A little strange I thought.

Perhaps the -verbose report for image output can be improved with the actual output coder format information?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply