Crop Activity

Build 1501 on 14/Nov/2017  This topic last edited on: 5/Aug/2014, at 14:52

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:

As XML (like before)

As ids

As names