Provide for watermark

Build 1501 on 14/Nov/2017  This topic last edited on: 21/Mar/2016, at 18:34

You can apply watermark on the image preview.

This is achieved by the modified workflow ..\config\global\gn4_tark4_common\wf_ CreateWatermarkPreview.xml (the code is available on the end of this topic).

The workflow uses TransformData activity with the step AddWatermark.

How it works?

1.Put in the appropriate folder (in this example it's c:\temp folder) the appropriate watermark imagel myWatermark.jpg (or change the path in the workflow wf_ CreateWatermarkPreview.xml)

2.Load wf_CreateWatermarkPreview.xml in the database by means of cmd4 config –in ..

3.Modify the wf_ImportActivityData.xml to call the new workflow wf_CreateWatermarkPreview.xml. Replace

                  <ExecuteSequentialWorkflow

                    x:Name="createImagePreview"

                    WorkflowName="createPreview"

                    Description="Creating image preview...">

with

                  <ExecuteSequentialWorkflow

                    x:Name="createImagePreview"

                    WorkflowName="createWatermarkPreview"

                    Description="Creating image preview...">

 

4.Load the modified file wf_ImportActivityData.xml in the database (cmd4 config –in ..)

5.Upload from the Web interface an image and check the result.

How to add watermark using parser.exe?

The command to add a watermark using the tool parser.exe is:

  parser -in "c:\temp\myImage.jpg" -convert AddWatermark -p:int 1 -p:int 0 -p:int 80 -p:string "c:\temp\myWatermark.jpg" -p:string “TopRight”

On the myImage.jpg will be applied myWatermark.jpg image as watermark; position TopRight; the watermark will have inverted colors (first integer parameter), will be not fitted to original image (second integer parameter), with transparency level 80 (third integer parameter).

Click to toggle expandWorkflow code

 

 

 

You can apply a watermark on cropped, but not yet processed images.

See the Crop workflow with watermark for further instructions.

Note

You need a Tera Forum account to access to this content: require it on the support desk.