Today we will explain the steps and algorithm of how to add diagonal stamp watermark and how to make it work in your application. ByteScout Watermarking SDK was made to help with stamp fits page diagonal in VB.NET. ByteScout Watermarking SDK is the software development kit that helps to quickly implement adding of watermarks on top of PNG, JPG, BMP images as well as on multipaged TIFF files. You may select ready to use presets or create your own preset with semitransparent logo images, text lines with adjustable font size, family, color, rotation.
VB.NET code samples for VB.NET developers help to speed up the application’s code writing when using ByteScout Watermarking SDK. Open your VB.NET project and simply copy & paste the code and then run your app! Use of ByteScout Watermarking SDK in VB.NET is also explained in the documentation included along with the product.
Trial version of ByteScout is available for free download from our website. This and other source code samples for VB.NET and other programming languages are available.
Imports Bytescout.Watermarking Module Module1 Sub Main() ' Create Watermarker instance Dim waterMarker As New Watermarker() ' Initialize library waterMarker.InitLibrary("demo", "demo") ' Set input file name Dim inputFilePath As String = "my_sample_image.jpg" ' Set output file title Dim outputFilePath As String = "my_sample_output.jpg" ' Add image to apply watermarks to waterMarker.AddInputFile(inputFilePath, outputFilePath) ' Create new watermark Dim preset As New Presets.StampFitsPageDiagonal() ' Set stamp type preset.ImageFile = "[APPROVED]" ' Add watermark to watermarker waterMarker.AddWatermark(preset) ' Set output directory waterMarker.OutputOptions.OutputDirectory = "." ' Apply watermarks waterMarker.Execute() ' open generated image file in default image viewer installed in Windows Process.Start(outputFilePath) End Sub End Module