The effect of + and - before options

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?".
Post Reply
djd
Posts: 41
Joined: 2011-11-12T22:20:18-07:00
Authentication code: 8675308

The effect of + and - before options

Post by djd »

In another post, snibgo mentioned something of which I was not aware but is useful to know. Snibgo wrote:
"Most, if not all, settings have "+" option to set the default value."

If this is the case, then maybe `antialias' is an exception as when creating an image, the default behaviour is to antialias the edge pixels and +antialias turns off the antialiasing.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: The effect of + and - before options

Post by fmw42 »

The + and - options can work differently for different functions, unfortunately. And in the case of antialias, it seems to be backwards from one's assumptions about + adding and - subtracting. Typically - enables the option and + disables the option. However, for example, -distort produce output of the same size as the input, whereas +distort can create a larger output. Not all options or settings have a + form.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: The effect of + and - before options

Post by snibgo »

Yeah, I should scrub that statement, and replace it with:
"Some settings have "+" option to set the default value."

Other settings where "+" doesn't restore the default include: depth, dither, format, fuzz, and probably others.
snibgo's IM pages: im.snibgo.com
Post Reply