Artec
Artec

Reputation: 183

How can I add watermark from Textbox to taken picture?

How can I put the text from a TextBox on captured images ? Is it possible to implement it to code from: Vb app code

Upvotes: 0

Views: 670

Answers (1)

Matt
Matt

Reputation: 133

You can easily do it using Bytescout.Watermarking SDK for .NET

Here's an example of code `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" '<-- place your captured image here
    ' 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" '<-- place your textbox.text here

    ' 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`

Source: how to add a simple transparent watermark

Upvotes: 1

Related Questions