Page 1 of 1

query settings

Posted: 2020-04-02T19:41:10-07:00
by user001
Is there a simple way to query the setting of an ImageMagick parameter (e.g., -pointsize or -stroke) using the CLI programs (magick, convert)? Printing the current value to stdout or stderr would suffice.

Re: query settings

Posted: 2020-04-02T19:45:11-07:00
by fmw42
There is nothing to query unless you are in a command line doing some processing and then you would know what value you used. Settings are just that. You have to set them. Have you tried adding -verbose to your command line.

If I misunderstand your question, please clarify your use case.

Re: query settings

Posted: 2020-04-02T20:10:28-07:00
by user001
I have used -verbose with `identify`, but didn't know it had an effect for `convert`/`magick`. The use case is to check the default values of some settings without consulting the source code.

Re: query settings

Posted: 2020-04-02T20:15:06-07:00
by fmw42
Other than the code and any documentation that lists it, I do not know of any way to list out the default values of settings.

The only documentation I know is at https://imagemagick.org/script/command-line-options.php

Re: query settings

Posted: 2020-04-02T21:26:09-07:00
by snibgo
IM has no mechanism for dumping the current values of settings, nor for resetting them to initial values.

Settings for drawing (pointsize, stroke-width etc) are initialised in draw.c GetDrawInfo().

Re: query settings

Posted: 2020-04-02T22:40:19-07:00
by user001
Thanks for clarifying and for pointing me to the relevant section of the source.