Page 1 of 1

Why does Imagemagick rant that much for non exisiting files?

Posted: 2017-07-21T12:50:07-07:00
by Jean-Pierre Coulon
If I say imagemagick nonexisting.jpg myresult.png I obtain 10 lines of rant with: unable to open... no image to apply... [3 times] unknown image property... [3 times]. Is'nt 1 line enough? Imagemagick won't let me save this rant saying imagemagick nonexisting.jpg myresult.png>myrant.txt.

Re: Why does Imagemagick rant that much for non exisiting files?

Posted: 2017-07-21T13:01:53-07:00
by snibgo
Text errors and warnings go to stderr, not stdout, so to capture them use "2>myrant.txt".

When the input doesn't exist, v6 gives me only three errors, but v7 gives 1 error and 6 warnings. You can disable warnings with "-quiet".

Re: Why does Imagemagick rant that much for non exisiting files?

Posted: 2017-07-28T17:48:33-07:00
by glennrp
Im6 only emits 2 lines while im7 seems to get into "property.c" with invalid input.
Also, "magick convert nothing.jpg nothing.png" only emits one line. It's just when
the "convert" is omitted that you get extra complaints from property.c.

It looks as though magick is stumbling into line 819 of MagickWand/magick-cli.c
after the image reader fails.

So, your solution is to use "magick convert ..." instead of "magick ..."