ByteScout Watermarking SDK - C# - Use Actual Units to Resize Image - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout Watermarking SDK – C# – Use Actual Units to Resize Image

  • Home
  • /
  • Articles
  • /
  • ByteScout Watermarking SDK – C# – Use Actual Units to Resize Image

How to use actual units to resize image for actual units resize in C# with ByteScout Watermarking SDK

Learn how to use actual units to resize image to have actual units resize in C#

ByteScout tutorials explain the code material for beginners and advanced programmers who are using C#. ByteScout Watermarking SDK was made to help with actual units resize in C#. ByteScout Watermarking SDK is the powerful SDK can apply high quality visible and semivisible watermarks into PNG, JPG, BMP pictures and TIFF scans. Doznes of presets are available, multiple watermarks can be applied. Can add logo based watermark from image, can adjust font size, font family, colors.

C# code snippet like this for ByteScout Watermarking SDK works best when you need to quickly implement actual units resize in your C# application. Open your C# project and simply copy & paste the code and then run your app! Test C# sample code examples whether they respond your needs and requirements for the project.

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

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.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); // Allow resize waterMarker.OutputOptions.Resize = true; // Set resize type to percentage waterMarker.OutputOptions.ResizeType = ResizeType.Actual; // Set units type waterMarker.OutputOptions.ResizeActualUnits = ActualSizeUnits.inches; // Set image width waterMarker.OutputOptions.ResizeWidthInUnits = 1.5f; // Set image height waterMarker.OutputOptions.ResizeHeightInUnits = 2.0f; // Set output directory waterMarker.OutputOptions.OutputDirectory = "."; // Apply watermarks waterMarker.Execute(); // open generated image file in default image viewer installed in Windows Process.Start(outputFilePath); } } }

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