ImageGeneric
Purpose
The ImageGeneric app calls a 3rdparty application to process all images dragged to one of its tiles. The tile's configuration specififes how the 3rdparty application gets its parameters and in which filename the result is stored.
Using the ImageGeneric app you have a powerful tool in your hands to bind in all command line oriented 3rdparty imaging applications into the TooLine.
Configuration
The general configuration handling is described here.
Property | Description |
---|---|
Application | The application to be started. The full path and application name must be specified. |
Command Line | The command line of the application. Use {1} to insert the current filename, see documentation below for more information. |
Result File Name | The result filename. Use {1} to insert the input file name, see documentation below for more information. |
Sample Command Line | Sample command line with expanded variables. The used file name is "C:\temp\sample.png". The file will only used "virtual" so the path and the file must not exists. |
Sample Result File Name | Sample result file path and -name with expanded variables. The used file name is "C:\temp\sample.png". The file will only used "virtual" so the path and the file must not exists. The value turns red in case of the output file is not created from the 3rdparty application as specified. |
Command line parameters
The command line and result file properties are using built-in functions to disassemble and assemble file paths and -names. All functions are working on parameters or strings. The used syntax is the following:
Syntax:
{<variable>|<string>[:<function>][, <parameter-1>, ..., <parameter-n>]}
Note:
Only one variable is allowed: the "1" which is containing the file name of the image dragged to the tile.
Function | Parameters | Description | Sample |
---|---|---|---|
substring | startIndex, length | Retrieves a substring from the given string. The substring starts at a specified character position (0 ist the first position) and has a specified length. |
{'Hello':substring,1,2} => el {'Hello':substring,1,9} => ello {'Hello':substring,1} => ello |
left | length | Retrieves a substring from the given string. The substring starts at the position 0 and has a specified length. If the original string is shorter than the given length the whole string is being returned. |
{'Hello':left,3} => Hel {'Hello':left,9} => Hello |
right | length | Retrieves a substring from the given string. The length n chars from the end of the strings are returned. If the original string is shorter than the given length the whole string is being returned. |
{'Hello':right,2} => llo {'Hello':right,9} => Hello |
trim | trim | Removes all leading and trailing white-space characters from the given string. | {' Hello ':trim} => Hello |
length | Retrieves the length of the given string. | {'Hello':length} => 5 | |
indexOf | stringToSearch | Reports the zero-based index of the first occurrence of the specified string in the given string. | {'Hello':indexOf,'l'} => 2 |
regex | input, replacement | Replaces all occurrences of a specified regular expression pattern with a replacement string, starting at the first character in the input string. | {'Hello':regex,'l.','nn'} => Henno |
name | filepath | Retrieves the filename (without the filepath and without the extension) from the given string. | {'\temp\Hello.png':name} => Hello |
nameExt | filepath | Retrieves the filename and extension (without the filepath) from the given string. | {'\temp\Hello.png':nameExt} => Hello.png |
ext | filepath | Retrieves the extension (without the filename) from the given string. The extension includes the leading ".". | {'\temp\Hello.png':ext} => .png |
path | filepath | Retrieves the filepath (without the filename and the file extension) from the given string. The path ends not with the path seperator "\". | {'\temp\Hello.png':path} => \temp |
samples
The following examples gives you an impression, how the configuration settings will influence the image processing.
sample 1
The used 3rdparty application takes the parameter without change. The result file name is the input file name with a "-400" before the fix extension ".jpg". So we need to get the original file path and the name and add a fixe "-400.jpg" at the end.
sample 2
The used 3rdparty application takes the parameter without change. The result file name is the input file name with a "-800" before the fix extension ".jpg". So we need to get the original file path and the name and add a fixe "-800.jpg" at the end.