Page 1 of 1
Error in website example
Posted: 2013-02-08T12:20:24-07:00
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!
Re: Error in website example
Posted: 2013-02-08T12:35:15-07:00
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.
Re: Error in website example
Posted: 2013-02-08T14:57:41-07:00
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.)
Re: Error in website example
Posted: 2013-02-08T15:07:12-07:00
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
Re: Error in website example
Posted: 2013-02-08T16:28:53-07:00
by magick
See
http://www.imagemagick.org/script/porting.php#cli and scroll down to
Deprecated warning given.
Re: Error in website example
Posted: 2013-02-10T19:38:56-07:00
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.