LEADTOOLS For .NET Class Library Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.28
Using the LEADTOOLS Workflow Load and Save Activities

Take the following steps to create and run a program that uses the LEADTOOLS WF activities to load an image, flip it then save it as JPEG:

  1. Start Visual Studio .NET.
  2. Choose File > New > Project... from the menu.
  3. In the New Project dialog box, choose either "Visual C#" or "Visual Basic" then "Workflow" in the Projects Type List, and choose "Sequential Workflow Console Application" in the Templates List.
  4. Type the project name as "WfLoadSave" in the Project Name field, and then choose OK. If desired, type a new location for your project or select a directory using the Browse button, and then choose OK.
  5. In the "Solution Explorer" window, right-click on the "References" folder, and select "Add Reference..." from the context menu. In the "Add Reference..." dialog box, select the ".NET" tab, browse to the "<LEADTOOLS_INSTALLDIR>\Bin\DotNet\Win32 folder, and select the following DLLs:
    • Leadtools.Workflow.Raster.dll
    • Leadtools.Workflow.ImageProcessing.dll
  6. Click Select and then click OK to add the above DLLs to the application.
  7. Set the output folder of the project .exe to where the LEADTOOLS .Net DLLs are installed. For example: "<LEADTOOLS_INSTALLDIR>\Bin\Dotnet\Win32".
  8. To add the LEADTOOLS activities to your toolbox, right-click the toolbox and select "Choose Items". In the "Choose Toolbox Items" dialog, go the "Activities" tab, and browse for and select the same DLLs from a previous step.
  9. Double-click your project's workflow to open it for editing, then select the following activities from the toolbox and place them on the workflow in the order specified:LoadImageActivity, FlipActivity, SaveImageActivity.
  10. Set the Url property of the LoadImageActivity to a path to an image file such as "LEADTOOLS Images\ImageProcessingDemo\IMAGE1.CMP".
  11. Set the TargetFile and Format properties of the SaveImageActivity to "c:\result.jpg" and "Jpeg" respectively.
  12. Bind the Image property of the FlipActivity to the Image property of the LoadImageActivity.
  13. Bind the Image property of the SaveImageActivity to the Image property of the FlipActivity.
  14. Set the DisposeImage property of the SaveImageActivity to true.
  15. Set the output folder of the project .exe to where LEADTOOLS .Net DLLs are installed. For example: <LEADTOOLS_INSTALLDIR>\Bin\Dotnet\Win32
  16. Build, and Run the program to test it.