ByteScout Watermarking SDK - C# - Resize Image in Percentage - ByteScout

ByteScout Watermarking SDK – C# – Resize Image in Percentage

  • Home
  • /
  • Articles
  • /
  • ByteScout Watermarking SDK – C# – Resize Image in Percentage

resize image in percentage in C# and ByteScout Watermarking SDK

Tutorial: how to do resize image in percentage in C#

ByteScout tutorials explain the material for programmers who use C#. ByteScout Watermarking SDK helps with resize image in percentage 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.

The SDK samples like this one below explain how to quickly make your application do resize image in percentage in C# with the help of ByteScout Watermarking SDK. Follow the instruction from the scratch to work and copy and paste code for C# into your editor. 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. It comes along with all these source code samples with the goal to help you with your C# application implementation.

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); // Allow resize waterMarker.OutputOptions.Resize = true; // Set resize type to percentage waterMarker.OutputOptions.ResizeType = ResizeType.Percentage; // Reduce image by 1/2 waterMarker.OutputOptions.ResizePercentage = 50; // Set output directory waterMarker.OutputOptions.OutputDirectory = "."; // 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