Page 1 of 1

-quiet mode not working

Posted: 2007-09-13T17:38:11-07:00
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)

Re: -quiet mode not working

Posted: 2007-09-13T17:43:30-07:00
by magick
The -quiet option suppresses warnings. The output you are receiving is an error.

Re: -quiet mode not working

Posted: 2007-10-02T00:11:34-07:00
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`