Montage command equivalent in version 7 without legacy command support?

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
svengineer99
Posts: 24
Joined: 2016-01-09T10:38:11-07:00
Authentication code: 1151

Montage command equivalent in version 7 without legacy command support?

Post by svengineer99 »

I'm trying to update my scripts to run under version 7 without legacy command support. I got all my convert statements replaced with magick statements working fine but now I'm stuck on montage. Unfortunately I can't find any relevant examples or documentation about it on this site or otherwise. Specifically the command I'm trying to replace is:

Code: Select all

montage file1.dds ( -clone 0 ) ( -clone 0 -flip ) ( -clone 2 ) -geometry +0+0 -background none file2.dds 
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage command equivalent in version 7 without legacy command support?

Post by fmw42 »

try

Code: Select all

magick montage file1.dds ( -clone 0 ) ( -clone 0 -flip ) ( -clone 2 ) -geometry +0+0 -background none file2.dds

This syntax works for me on Unix. But I do not use Windows, so cannot verify, but expect it should be the same.

see http://imagemagick.org/script/porting.php#cli
svengineer99
Posts: 24
Joined: 2016-01-09T10:38:11-07:00
Authentication code: 1151

Re: Montage command equivalent in version 7 without legacy command support?

Post by svengineer99 »

Thanks! That worked, of course. I had previously incorrectly guessed magick -montage that didn't work.

This is slightly off topic, but it seems really strange for the IM team to release a new version with so many commonly used and well documented commands deprecated to legacy status, and doubly so when the new commands are not well documented. For example, I do not find montage as an option documented in the magick command at http://www.imagemagick.org/script/magick.php. Am I going about this in the wrong way? Is IM7 not recommended for common usage quite yet (and if so then why is it the default binary download now)? Or am I just missing something?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage command equivalent in version 7 without legacy command support?

Post by fmw42 »

The porting document is all I know that describes how to use these other tools. I did not write the documenation.

All tools are now called from magick. And magick is by itself equivalent to convert, though I suppose you could do

Code: Select all

magick convert ....
though I have not tested that. On Unix, convert by itself is acceptable, since it is just a symbolic link to magick.

The legacy forms are available so that you do not need the magick command, I believe, on Windows.

But IM 7 is now the official release, though IM 6 will be around for quite a while longer. Only a few very old commands that have not been used in quite a long time are deprecated and do not work. The other deprecated commands still work for now.

One of the developers can correct me if I am wrong about any of the above.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Montage command equivalent in version 7 without legacy command support?

Post by snibgo »

The ability to run legacy utilities (convert, mogrify etc) from magick is briefly mentioned in the v7 porting guide: http://www.imagemagick.org/script/porting.php This is a fairly brief document and I'd say should be required reading for anyone who is upgrading to v7.

V7 is a major upgrade. In my view, as a mere user, we need to be prepared for problems in the code and documentation. A couple of months ago I changed all my MagickCore code to work under both v6 and pre-release v7, but I haven't yet tested it under the public release. Nor have I thoroughly tested my command-line scripts against v7. I expect it will take at least two months before I do so.

Officially, v7 is the current release and v6 is "legacy". But v6 is available, currently at v6.9.4-1, and I expect it will be for some time.

I may eventually become non-legacy and use "magick" for everything. That may not happen this year.

(As always, my comments are my own and not "official" in any way.)
snibgo's IM pages: im.snibgo.com
svengineer99
Posts: 24
Joined: 2016-01-09T10:38:11-07:00
Authentication code: 1151

Re: Montage command equivalent in version 7 without legacy command support?

Post by svengineer99 »

Thanks for both your comments. As a practicing engineer myself, it still seems crazy to me that I'm having to re-write all my scripts to work on IM7. In some cases it's been trivial but others have not (earlier bug post). Anyways, I don't want to seem ungrateful, because I really am grateful for the existence of IM, but for the sake of IM's long term success and viability I hope backwards compatibility will be considered with higher importance for future revisions.

One thing I should add is that the http://imagemagick.org/script/porting.php#cli doesn't load quite correctly for me on Win7 IE or Chrome; searching for 'montage' finds one result but it seems hidden in the browser with "animate, compare, composite, conjure, convert, display, identify, import, mogrify, montage, stream" being truncated to "animate, compare, c..." Saving and opening the .html file in a text editor I can find the missing text regarding the new usage but it's literally mostly invisible in my browsers, which explains at least part of my apparent ineptitude in porting to IM7.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage command equivalent in version 7 without legacy command support?

Post by fmw42 »

With exception to only a few issues with -alpha and -page related changes, all of my over 300 (command line) scripts have been tested against IM 7 and work using the convert command (as opposed to the magick command). So in this regard, it has been made backward compatible. Also, most of the deprecated commands still work. So there is still backward compatibility in that respect.

I think the IM developers (and other users) would be interested to know what issue you are finding, especially if they are not covered in the porting page.

But sometimes to make headway with new features, some changes are needed. IM 7 was designed so that grayscale images are processed as one channel and not three. And it permits more than 4 channels. But feature-wise, I don't believe we have lost anything.

Furthermore the code has been made to conform better to proper (later IM 6 as opposed to IM 5 and early IM 6) syntax and may fail if the user does not specify operators and settings in the correct order. So it is tightened up to prevent unusual (and perhaps risky) behavior against poor syntax.
svengineer99
Posts: 24
Joined: 2016-01-09T10:38:11-07:00
Authentication code: 1151

Re: Montage command equivalent in version 7 without legacy command support?

Post by svengineer99 »

I had problems with >50% of my previusly working fine convert statements (even with legacy convert support enabled) due to issues like the one you helped me resolve at viewtopic.php?f=3&t=29582.

And 100% of my commands required replacing convert and montage statements with magick to work correctly without legacy support. The backward compatibility with "legacy support option" is not really a good option as anything more than stop gap.

Anyways, I do appreciate the entire IM team's work and support (including the very quick replies on this topic) that have enabled the project I'm working on. I just pray that future updates down the line don't break it again after I've moved on and am unable to fix it again. Maybe I'm the only user with these problems and concerns but that's what they are.

Thank you all at IM again.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage command equivalent in version 7 without legacy command support?

Post by fmw42 »

The correction I gave you just replaced the pipes to make it all one convert command and fixed your bad syntax.

If you can post other examples, we can see if we can help you with the issue you are having.
svengineer99
Posts: 24
Joined: 2016-01-09T10:38:11-07:00
Authentication code: 1151

Re: Montage command equivalent in version 7 without legacy command support?

Post by svengineer99 »

They were all similar 'bad syntax' that previously worked flawlessly to on IM6.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Montage command equivalent in version 7 without legacy command support?

Post by fmw42 »

svengineer99 wrote:They were all similar 'bad syntax' that previously worked flawlessly to on IM6.
Sorry to hear that it was faulty IM 6 syntax. IM 6 was too forgiving in many cases.
Post Reply