Crop Activity is used within image crop WindowsWorkflows.
Improvements to the Crop WindowsWorkflow activity
Added new output properties (SelectedDestId, SelectedDestIds and SelectedDestName) that contain the id and the name of the extract destination selected by the user into the cropping control.
The data of this destination (resolution, etc...) is then used to actually cropping the picture.
•SelectedDestId: id of the selected extract destination as integer
•SelectedDestIds: id of the selected extract destination as list of integers. This list contains only the id of the extract destination selected by the user and it is compatible with all activities expecting a list of integer as input (ObjectsAction and descenders).
•SelectedDestName: the name of the selected extract destination as string
These output properties of the Crop activity can be bound to the properties of the other WindowsWorkflow activities. For example:
<Crop
x:Name="cropForm">
<Log
x:Name='logDebug'
Message="Selected destination: id {0}, name '{1}'">
<Log.Pars>
<wf:WorkflowParameterBinding wf:ParameterName="p0" wf:Value="{wf:ActivityBind cropForm, Path=SelectedDestId}"/>
<wf:WorkflowParameterBinding wf:ParameterName="p1" wf:Value="{wf:ActivityBind cropForm, Path=SelectedDestName}"/>
</Log.Pars>
</Log>
</Crop>
Note that the standard cropping WindowsWorkflow (wf_Crop.xml) stores the id of the extract destination used for cropping into the 'crops.extractRef' attribute of the original image.
Added two new input properties (DestinationIds and DestinationNames). The input properties allow to specify the extract destinations prompted by the crop control passing them to the Crop activity either by ids or by names (just like the Variant activity accepts the VariantTypes either as ids and as names).
So, now there are many ways to specify the crop extract destinations into a WindowsWorkflow:
oEmbedded into the WindowsWorkflow
|
loaded from database: <wfres:workFlow> <NavigatorWorkflow x:Name="mainWorkflow">
<!-- load the extractDest from the database --> <Execute x:Name="destinations">
<Search x:Name="searchDestinations" IdsOut='{wf:ActivityBind mainWorkflow, Path=IdsVars["destinations"]}' /> </Execute>
<!-- show the crop control --> <Crop x:Name="cropForm" DestinationIds='{wf:ActivityBind mainWorkflow, Path=IdsVars["destinations"]}' />
</NavigatorWorkflow>
<!-- searchConditions to search for extract destinations into the database --> <SearchConditions wfres:activityName="searchDestinations" ObjectTypeName="extractDest" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.teradp.com/schemas/GN4/1/SearchConditions.xsd" /> </wfres:workFlow> |
•embedded into the workflow: <Crop x:Name="cropForm">
<Crop.DestinationNames> <x:Array Type="{x:Type sys:String}"> <sys:String>Default</sys:String> <sys:String>Images</sys:String> </x:Array> </Crop.DestinationNames> </Crop> •read from workflow parameters <Crop x:Name="cropForm" DestinationNames='{wf:ActivityBind mainWorkflow, Path=ParValueAsStrings["extractDestName"]}' /> |