12.06.2015 Views

IntelliTuneX / OptiInk Scripting - arkitex - Agfa

IntelliTuneX / OptiInk Scripting - arkitex - Agfa

IntelliTuneX / OptiInk Scripting - arkitex - Agfa

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ITX / <strong>OptiInk</strong> <strong>Scripting</strong><br />

________________________________________________________________________________________<br />

grays in the watermark a subtle watermarking can be achieved.<br />

• New watermark command strings can be added if one checks out the available ImageMagick<br />

commands and parameters. It would also be possible to combine methods to achieve both<br />

image and text effects.<br />

9.3.5. Structure<br />

The IMWatermark.vbs Script consists of a main routine which gets its parameters, formats an<br />

appropriate ImageMagick command line and then executes it.<br />

It has the following functions<br />

• GetArguments to get it’s the input parameters from the application. This also supports a local<br />

test mode if the script is run by double clicking and it will then ask for the arguments in turn.<br />

• WatermarkImage builds the command string by substituting parameters and then calls<br />

Imagemagick to perform the watermarking process<br />

• MoveToOutput performs the file renaming and clean up after the watermarking completes<br />

• Rename is a hook function which may be used to insert extra naming of the output file when<br />

used as a MoveBy Script. It is passed the original filename and also the name as configured<br />

on the Output process. It may manipulate both of these to produce a final output name. If it<br />

returns an empty string then the operation is skipped.<br />

• GetDateString is used to format a date to be used in etxt watermarking<br />

• CleanServerName cleans up supplied UNC Names<br />

• FindCmd is used to find the location of the highest version of Ghostscript or Imagemagick<br />

installations. By default these are searched in the default Program Files folders. Additional<br />

search paths may be added by editing the CMD_SEARCHPATh at the top of the script.<br />

• FindCmdInFolder supports the FindCmd function to locate a version of the cmd in a folder<br />

• GetProgramFilesPath gets the default Program Files path<br />

• InitLogging initialises logging<br />

• WriteLog writes a single log message<br />

________________________________________________________________________________________<br />

<strong>Agfa</strong> 25-Jan-11 Issue 001 Released Page 22 R.J.Tidey

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!