Documentation available in IM 6.x missing in IM 7.x?

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
polemon
Posts: 1
Joined: 2020-01-26T19:38:48-07:00
Authentication code: 1152

Documentation available in IM 6.x missing in IM 7.x?

Post by polemon »

Hi, I've compiled ImageMagick 7.0.9-20 Q16 the other day.
Since I'm only used to IM 6.x, I'm very much reliant on the documentation that comes with IM 7.
However, I have trouble finding some of the doc pages I'm used to. One such page is this: imagemagick.org/Usage/files I just can't find the equivalent page in the IM 7.x docs. Or any other page, that discusses the "special files", like "rose:", "xc:" "miff:", etc.

Specifically, I'd like to make use of magick-script, it's something I've never used before, and I want to see if I can make things more easier for me. However, I can't seem to find out how to use parameters in magick-scripts, if this is possible at all.
Things like invoking a magick script with:

Code: Select all

$ magick-script script.magick filename.png
I'd like to reference filename.png in the script script.magick.

the magick-script tool could definitely do with a bit more documentation, for instance whether I can use multiple lines in a script, or if I need to escape newlines, etc.

So, if someone could perhaps point me to slightly more documentation about script-magick and how to use it more like an actual scripting language with command line parameters, etc, that would be nice.

~~~~~~~~~~~
PS.: This is my first post on the IM forum.
I had a quick search using the phpBB search function, but it didn't yield anything useful to me. In case there are curated answers (similar to StackExchange, for instance), I'd love to be pointed to those, too.

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

Re: Documentation available in IM 6.x missing in IM 7.x?

Post by fmw42 »

There is no update to imagemagick.org/Usage for IM 7. The special files such as rose:, xc:, etc have not changed such that the documentation would be different. Changes for IM 7 can be found at https://imagemagick.org/script/porting.php#cli

There is only limited information about magick scripting. See

https://imagemagick.org/script/magick-script.php
https://imagemagick.org/Usage/bugs/IMv7_Scripting.txt

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

Re: Documentation available in IM 6.x missing in IM 7.x?

Post by snibgo »

Magick scripts don't take parameters.

Magick scripts can't call other magick scripts. Aside from that, and comments, the language script is exactly the same as "magick" command language.

For a magick command, we can call only one script. When the script finishes, so does the command.

At the CLI (command language interface), commands are initially interpreted by the shell (eg bash or Windows BAT), so shell rules must be followed for escapes and line-continuation. The shell strips these and passes the result to magick. On the other hand, in a magick script, we don't need escapes or line-continuation characters. Yes, we can write as many lines as we want.

At the CLI, we don't usually use "-read {file}", or "-write {file}" or "-exit". But we could.

There is a cute trick that means we can run a magick script from bash or Windows, without caring which is used. Umm, really useful.

I think that is all that can be said about v7 scripts.
snibgo's IM pages: im.snibgo.com

Post Reply