ByteScout Watermarking SDK - C# - Show Progress Indication - ByteScout

ByteScout Watermarking SDK – C# – Show Progress Indication

  • Home
  • /
  • Articles
  • /
  • ByteScout Watermarking SDK – C# – Show Progress Indication

How to show progress indication in C# using ByteScout Watermarking SDK

This tutorial will show how to show progress indication in C#

Learn how to show progress indication in C# with this source code sample. 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. It can show progress indication in C#.

C# code samples for C# developers help to speed up coding of your application when using ByteScout Watermarking SDK. Follow the instructions from the scratch to work and copy the C# code. Detailed tutorials and documentation are available along with installed ByteScout Watermarking SDK if you’d like to dive deeper into the topic and the details of the API.

Free trial version of ByteScout Watermarking SDK is available on our website. Documentation and source code samples are included.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using System.IO; using Bytescout.Watermarking; using Bytescout.Watermarking.Presets; namespace ProgressIndicator { class Program { static void Main(string[] args) { // Create Watermarker instance Watermarker waterMarker = new Watermarker(); // Initialize library waterMarker.InitLibrary("demo", "demo"); // Add images to apply watermarks to waterMarker.AddInputFile("image1.jpg", "image1_watermarked.jpg"); waterMarker.AddInputFile("image2.jpg", "image2_watermarked.jpg"); waterMarker.AddInputFile("image3.jpg", "image3_watermarked.jpg"); // Create new watermark TextFitsPage preset = new TextFitsPage(); // Set watermark text preset.Text = "My Watermark (c) Me 2010"; // Add watermark to watermarker waterMarker.AddWatermark(preset); // Add Progress event handler waterMarker.Progress += new ProgressEventHandler(waterMarker_Progress); // Apply watermarks waterMarker.Execute(); Console.WriteLine(); Console.WriteLine("Hit any key..."); Console.ReadKey(); } static void waterMarker_Progress(double percent, string status, string processedFile, ref bool abort) { string message; if (!String.IsNullOrEmpty(processedFile)) { message = String.Format("{0}: {1}: {2:f02}%", Path.GetFileName(processedFile), status, percent); } else { message = String.Format("{0}: {1:f02}%", status, percent); } Console.WriteLine(message.PadRight(Console.WindowWidth)); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Watermarking SDK Home Page

Explore ByteScout Watermarking SDK Documentation

Explore Samples

Sign Up for ByteScout Watermarking SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout Watermarking SDK Home Page

Explore ByteScout Watermarking SDK Documentation

Explore Samples

Sign Up for ByteScout Watermarking SDK Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next