STOIK Imaging - makers of photo and video editing software

Interface: Automation

Scripting and macro language
Open Macros window (menu View-Windows) and make sure that Recording option is On. Now whatever you do with image will be scripted. Script can be stored and edited. Scripting provides multiple possibilities:
  • reapply complex processings to multiple images (just click Run or F5
  • easily make changes to parameters in intermediate processing
  • use script for external automation of Picture Man 4.2
Macros window
External automation
Picture Man 4.2 can be used as an automation server for external scripting and batch processing.

You can call Picture Man commands from any other application supporting automation, e.g. from Visual Basic Script or Java Script.

To use Picture Man automation server you should first initiate "Pman40.Application". Methods of this object correspond to commands of internal scripting language.

Flaming text
Image created in Picture Man 4.2 using script below. Copy script to Macros window of Picture Man 4.2 and click F5 to run. Note that each line should be ended with <CR>
Writing external scripts
To use Picture Man automation server you should first initiate "Pman40.Application". Methods of this object correspond to commands of internal scripting language.

Scripting commands have quite complex syntax to write external script from scratch, but if you use internal script from Macros window than converting it to VB or Java script is easy:

See original internal script of Picture Man 4.2 and how it is to be converted to other languages

Picture Man 4.2 Internal script example

CreateNewImage("Flaming text",500,300,600,600,{0,0,0});
SetEdgeDegree(0);
SetEdgeType(0);
AddText(30,30, 200, 90, 0, 0, 0, 1, 0, 0, 0, 7, 2, 2, 0, "Times New Roman", " hot", 14)
SetActiveLayer(0);
ColorFill(0,{255,255,255},0,0,0);
SelectWholeImage();
Crystallize(4);
CopyToNewLayer(0);
FreeAllFrags();
AddText(30,30, 200, 90, 0, 0, 0, 1, 0, 0, 0, 7, 2, 2, 0, "Times New Roman", " hot ", 14)
SetActiveLayer(1);
PixelStorm(100,100,75,0,0,1,0);
FreeAllFrags();
SelectWholeImage();
MotionBlur(0,40);
SetLayerOptions("Layer 2","Lighten",100,0xffff0000,0xffff0000,0xffff0000,0xffff0000,0xffff0000,0xffff0000,0xffff0000,0xffff0000);
RandomDeformations(2,7,7,50,0);
FlattenImage();
Levels(0,255,0,255,1000,0,63,0,255,1000,31,151,0,255,1000,123,255,0,255,1000);

Visual Basic Script example Set X = WScript.CreateObject("Pman40.Application")
X.CreateNewImage "Flaming text", 500, 300, 600, 600, 0, 0, 0
X.SetEdgeDegree 0
X.SetEdgeType 0
X.AddText 30,30, 200, 90, 0, 0, 0, 1, 0, 0, 0, 7, 2, 2, 0, "Times New Roman", " hot", 14
etc.
JavaScript example var X = WScript.CreateObject ("Pman40.Application");
X.CreateNewImage("Flaming text",500,300,600,600,0,0,0);
X.SetEdgeDegree(0);
X.SetEdgeType(0);
X.AddText(30,30, 200, 90, 0, 0, 0, 1, 0, 0, 0, 7, 2, 2, 0, "Times New Roman", " hot", 14)
etc.
Visual C++ MFC Example To create Picture Man Automation object, use COleDispatchDriver class:

COleDispatchDriver driver;
if (!driver.CreateDispatch (_T(“Pman40.Application”)))
// error processing…

To invoke any Picture Man command, use COleDispatchDriver methods:

OLECHAR *szMember = L"OpenFile";
DISPID dispid;
HRESULT hr = driver.m_lpDispatch->GetIDsOfNames (IID_NULL, &szMember, 1,
LOCALE_USER_DEFAULT, &dispid);
if (FAILED (hr))
// error processing…
BOOL ret;
BYTE BASED_CODE parms[] = VTS_BSTR;
driver.InvokeHelper (dispid, DISPATCH_METHOD, VT_BOOL, &ret, parms, lpPathName);
if (ret)
// error processing…
300w.gif (101 bytes)