Quick Nav Bar | ||||||||
---|---|---|---|---|---|---|---|---|
<< Previous | Contents |
Selection |
Op Index |
Parent | User Notes |
Index |
Glossary |
Next >> |
WinImages F/x uses a language similar to BASIC to allow you to write custom script operators that use WinImages F/x's in-built image processing operators. If you're interested, you can even write your own operators. The only thing to keep in mind is that because the scripting language is interpreted, any direct script-based manipulation of images will be quite slow compared to WinImages F/x's own image manipulation, or manipulation performed by a plug-in. (Did that get you interested in plug-ins? You'll find plug-in developer information here)
Script Controls
Key Features
Where do scripts go?
How it Works
An introduction to Scripting Syntax
Scripting Commands
Profiles and Palettes
Example Scripts
Common Problems
Path & Script File
Together, these hold the information regarding the location of the script. "Script File" contains the actual name of the script. "Path" contains the directory in which the script is contained.
Browse
Browse allows you to search your computer for the location of the script.
Edit
Edit allows you to edit the script with WinImages F/x's built-in quick edit window.
New
New opens up the quick edit window and allows you to save your new script.
|
Scripts are normal ASCII text. The filename should have the extension ".WIS".
The name of the script will be saved when dragged into the timeline, this means that different scripts can be used in different frames in the timeline.
In response to the area selection, WinImages calls the script, which can then in turn call WinImages requesting one or more functions that will work on the area selection.
Or, the script can "talk to" WinImages directly, learn where the area selection is, and then process the image data directly. That means that almost any kind of filter or effect imaginable can be created, given the time, energy and incentive.
From the script-user's standpoint, all that needs to be done is select a pre made script, and make an area selection. The script does the rest.
From the script-writer's standpoint, the script can be anything from one line, like this:
10 A=ANNULAR(64,64,255,0,1)
...to almost any complex combination of features and functions and calculations you can imagine. You can find examples of scripts at various levels of complexity here.
The reason we chose BASIC as the model for our scripting language is that BASIC is very easy to learn, in fact it is probably the easiest programming language there is, yet it still provides a great degree of power and flexibility to the user. With that in mind:
In WinImages F/x, scripts execute in response to the user making an area selection on an image. The script may issue commands to WinImages F/x, causing a predefined function to run, or it may operate directly on image data. The area selection that the user made will control what portions of the image that the script may modify; however, the script may read from any portion of the image, or of the undo buffer which will contain an unmodified copy of the image during the entire script operation. Scripts may access image pixel data as either RGB or HSL entities; you can even access a pixel both ways at the same time. This allows you to process the pixel in a number of useful ways.
Skeletal Syntax Issues
Each line in a .WIS script file must begin with a line number. Line numbers are integers from 1 to 32000.
A line may contain one or more statements; when more than one statement is contained in a line, each statement is to be separated by a colon (:).
Blank lines are allowed.
Any number of spaces and/or TAB characters may be entered around line numbers.
Numeric variables are named using one or more alphanumeric characters, with the rule that they must start with an alphabetic character. Numeric variables are case-sensitive; the variable "A" is not the same as the variable "a". All numbers are floating point numbers; when an integer is required by WinImages F/x, the fractional part, if any, of a number is simply discarded.
Text variables are named using one or more alphanumeric characters followed by the dollar sign ($), with the rule that they must start with an alphabetic character. Text variables are case sensitive; the variable "A$" is not the same as the variable "a$".
Multiply-dimensioned variables of either type may be created with the DIM statement.
In the case of both numeric and text variables, names longer than one character are allowed, as long as those names are not the name of any command, function or keyword in the scripting language. For instance, a variable named "peak" is ok, but a variable named "print" is not ok.
The PRINT statement, while in most ways similar to PRINT in standard BASIC, sends output to a dialog within WinImages F/x. This allows you to send messages to the user during script execution.
Quick Nav Bar | ||||||||
---|---|---|---|---|---|---|---|---|
<< Previous | Contents |
Selection |
Op Index |
Parent | User Notes |
Index |
Glossary |
Next >> |
WinImages F/x Manual Version 7, Revision 5, Level B |