-quiet mode not working

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

-quiet mode not working

Post by fmw42 »

My correspondence with Anthony Thyssen on this topic (where bogus.png does not exist). I was working with IM v6.3.5.7


| If I do the following:
|
| if convert -regard-warnings "bogus.png" "tmp.png"
| then
| : ' do something else'
| else
| echo "--- cannot read input file ---"
| exit 1
| fi
|
|
| Then I get:
|
| convert: unable to open image `bogus.png': No such file or directory.
| convert: unable to open file `bogus.png'.
| convert: missing an image filename `tmp.png'.
| --- cannot read input file ---
|
|
| If I add -quiet as follows:
|
| if convert -regard-warnings -quiet "bogus.png" "tmp.png"
| then
| : ' do something else'
| else
| echo "--- cannot read input file ---"
| exit 1
| fi
|
|
| then I still get the same result:
|
| convert: unable to open image `bogus.png': No such file or directory.
| convert: unable to open file `bogus.png'.
| convert: missing an image filename `tmp.png'.
| --- cannot read input file ---
|

That is a definate BUG. (Anthony)
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -quiet mode not working

Post by magick »

The -quiet option suppresses warnings. The output you are receiving is an error.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: -quiet mode not working

Post by anthony »

Okay then the alternative is to capture the error output and print it at the appropriate time. Eg

Code: Select all

error=`convert -quiet -regard-warnings ...... 2>&1`
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply