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

ByteScout Watermarking SDK – C# – Resize Image in Pixels

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

resize image in pixels in C# and ByteScout Watermarking SDK

Make resize image in pixels in C#

:

Tutorial on how to do resize image in pixels in C#

Today you are going to learn how to resize image in pixels in C#. ByteScout Watermarking SDK was made to help with resize image in pixels 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.

You will save a lot of time on writing and testing code as you may just take the code below and use it in your application. C# sample code is all you need: copy and paste the code to your C# application’s code editor, add a reference to ByteScout Watermarking SDK (if you haven’t added yet) and you are ready to go! Enhanced documentation and tutorials are available along with installed ByteScout Watermarking SDK if you’d like to dive deeper into the topic and the details of the API.

Visit our website provides for free trial version of ByteScout Watermarking SDK. Free trial includes lots of source code samples to help you 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); // Allow resize waterMarker.OutputOptions.Resize = true; // Set resize type to percentage waterMarker.OutputOptions.ResizeType = ResizeType.Pixels; // Set image width waterMarker.OutputOptions.ResizeWidthInPixels = 100; // Set image height waterMarker.OutputOptions.ResizeHeightInPixels = 100; // 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