Error in website example

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
Marc Rochkind
Posts: 10
Joined: 2013-02-01T15:14:21-07:00
Authentication code: 6789

Error in website example

Post by Marc Rochkind »

At the very top of one of the first pages (http://www.imagemagick.org/script/comma ... ptions.php) is this example:

Code: Select all

$ convert label.gif +matte \ 
\( +clone -shade 110x90 -normalize -negate +clone -compose Plus -composite \) \
\( -clone 0 -shade 110x50 -normalize -channel BG -fx 0 +channel -matte \) \
-delete 0 +swap -compose Multiply -composite button.gif
In trying to figure it out, I was stumped by the +matte setting.

Turns out it's now obsolete!

It would be kinder to delay throwing those new to IM off course on the fourth of fifth page, but, please, not on the first! ;-)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error in website example

Post by fmw42 »

Anthony's examples should still work, even though they have not been updated for newer syntax, so that people on older versions of IM have correct syntax that works. It is deprecated, but should still work. The replacements are -alpha set for -matte and -alpha off for +matte

see
http://www.imagemagick.org/Usage/masking/#alpha


My guess is that it will be removed in IM 7 which is under alpha development right now. Once it is released, I suspect that Anthony will make new IM 7 Examples.


P.S. The link you show, does not seem to go to that example, but to the options page which lists the IM commands. However, -matte is not shown there as it lists non-deprecated methods and settings. Perhaps a list of deprecated methods and settings should be shown under that list or a link referenced to another page.
Marc Rochkind
Posts: 10
Joined: 2013-02-01T15:14:21-07:00
Authentication code: 6789

Re: Error in website example

Post by Marc Rochkind »

Thanks, Fred. But the issue is that someone new would go to the options page to see what "matte" did, and wouldn't find it in the alphabetical listing.

(Actually, the REAL issue is that I'm writing a GUI wrapper for IM and I constructed the various lists of settings, commands, and images from the help output of the command, so when I stuck that example into my app, it didn't know what matte was. Then, I went to look up matte, and didn't find it. It's not that I care what matte does exactly. It's rather ensuring that my app to process command lines that IM accepts. Not having a complete list of the arguments makes it more complicated.)
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Error in website example

Post by fmw42 »

Perhaps you should post a note in the Developer's forum and ask them to make a list of deprecated options. May be there is one, but I do not know where it resides. There are probably not too many. I know of a few: -matte, -average and -median. But there are likely a few others.

-matte -----> -alpha set
+matte -----> -alpha off
-average ----> -evaluate-sequence mean
-median ----> -statitistic median
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Error in website example

Post by magick »

See http://www.imagemagick.org/script/porting.php#cli and scroll down to Deprecated warning given.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Error in website example

Post by anthony »

Many examples in IM Examples have been changed to use -alpha instead of +/-matte
However it is a slow change, and done as examples are re-examined for one reason or another.

Of course in IMv7 all examples will need to be changed to use "magick" rather than "convert"
as well as new sections added for IM command scripting.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply