ByteScout Watermarking SDK – VB.NET – _Getting Started

  • Home
  • /
  • Articles
  • /
  • ByteScout Watermarking SDK – VB.NET – _Getting Started

ByteScout Watermarking SDK – VB.NET – _Getting Started


Imports System.Diagnostics
Imports Bytescout.Watermarking
Imports Bytescout.Watermarking.Presets

Module Module1

    Sub Main()
	' Create new watermarker
        Dim waterMarker As New Watermarker()
	' Create new preset
        Dim preset As New TextFitsPage()
	' Create new string
        Dim inputFilePath As String
	' Create new string
        Dim outputFilePath As String

        ' Set input file path
        inputFilePath = "my_sample_image.jpg"
        ' Set output file path
        outputFilePath = "my_sample_output.jpg"

        ' Initialize library
        waterMarker.InitLibrary("demo", "demo")

        ' Add image to apply watermarks to
        waterMarker.AddInputFile(inputFilePath, outputFilePath)

        ' Set preset text
        preset.Text = "Bytescout Watermarking"

        ' Add watermark to watermarker

        ' Set output directory
        waterMarker.OutputOptions.OutputDirectory = "."

        ' Apply watermarks

        ' Open generated image file in default image viewer installed in Windows

    End Sub

End Module

  Click here to get your Free Trial version of the SDK