query settings

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?".
Locked
user001
Posts: 42
Joined: 2015-11-02T01:21:03-07:00
Authentication code: 1151

query settings

Post 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.

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

Re: query settings

Post 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.

user001
Posts: 42
Joined: 2015-11-02T01:21:03-07:00
Authentication code: 1151

Re: query settings

Post 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.

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

Re: query settings

Post 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

snibgo
Posts: 13034
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: query settings

Post 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().
snibgo's IM pages: im.snibgo.com

user001
Posts: 42
Joined: 2015-11-02T01:21:03-07:00
Authentication code: 1151

Re: query settings

Post by user001 »

Thanks for clarifying and for pointing me to the relevant section of the source.

Locked