ByteScout Watermarking SDK - C# - Add Logo and Text to Image with Options - ByteScout

ByteScout Watermarking SDK – C# – Add Logo and Text to Image with Options

  • Home
  • /
  • Articles
  • /
  • ByteScout Watermarking SDK – C# – Add Logo and Text to Image with Options

How to add logo and text to image with options for logo image with text in C# using ByteScout Watermarking SDK

How to add logo and text to image with options for logo image with text in C#: How To Tutorial

These source code samples are listed and grouped by their programming language and functions they use. ByteScout Watermarking SDK was made to help with logo image with text in C#. ByteScout Watermarking SDK is the library for software developers that can be used to quickly add image watermarking features into your web or desktop applications. Use ready to use presets or create your own to be applied for input PNG, JPG, BMP images. Can customize fonts, text position and rotation if required.

Fast application programming interfaces of ByteScout Watermarking SDK for C# plus the instruction and the code below will help to learn how to add logo and text to image with options. For implimentation of this functionality, please copy and paste code below into your app using code editor. Then compile and run your app. Enjoy writing a code with ready-to-use sample C# codes to implement logo image with text using ByteScout Watermarking SDK.

Our website provides free trial version of ByteScout Watermarking SDK that includes source code samples to help with your C# project.

Try ByteScout Watermarking SDK today: Get 60 Day Free Trial or sign up for Web API

Program.cs
      
using System; using System.Diagnostics; using System.Drawing; using System.Collections.Generic; using Bytescout.Watermarking; using Bytescout.Watermarking.Presets; namespace Sample { class Program { static void Main(string[] args) { // Create Watermarker instance Watermarker waterMarker = new Watermarker(); // Initialize library waterMarker.InitLibrary("demo", "demo"); // Set input file name string inputFilePath = "my_sample_image.jpg"; // Set output file title string outputFilePath = "my_sample_output.jpg"; // Add image to apply watermarks to waterMarker.AddInputFile(inputFilePath, outputFilePath); // Create new watermark LogoWithText preset = new LogoWithText(); // Select image file preset.ImageFile = "mylogo.png"; // Set text transparency preset.Transparency = 40; // Set watermark placement preset.Placement = WatermarkPlacement.MiddleCenter; // Set text preset.Text = "Bytescout Watermarking"; // Set text location preset.TextLocation = TextLocation.Bottom; // Set text color preset.TextColor = Color.Black; // Set text Alignment preset.TextAlignment = TextAlignment.Center; // Set text font preset.Font = new WatermarkFont("Tahoma", FontStyle.Regular, FontSizeType.Points, 20); // Add watermark to watermarker waterMarker.AddWatermark(preset); // Set output directory waterMarker.OutputOptions.OutputDirectory = "."; // Set output format waterMarker.OutputOptions.ImageFormat = OutputFormats.JPEG; // Apply watermarks waterMarker.Execute(); // open generated image file in default image viewer installed in Windows Process.Start(outputFilePath); } } }

Try ByteScout Watermarking SDK today: 60 Day Free Trial (on-premise version) or sign up for Web API (on demand version)

VIDEO

ON-PREMISE VERSION

Get 60 Day Free Trial or Visit ByteScout Watermarking SDK page

Explore ByteScout Watermarking SDK documentation

WEB API

Sign Up for free Web API key

Explore Web API Documentation

Tutorials:

prev
next