ByteScout Watermarking SDK - C# - Change DPI Image Resolution - ByteScout

ByteScout Watermarking SDK – C# – Change DPI Image Resolution

  • Home
  • /
  • Articles
  • /
  • ByteScout Watermarking SDK – C# – Change DPI Image Resolution

How to change DPI image resolution in C# using ByteScout Watermarking SDK

How to code in C# to change DPI image resolution with this step-by-step tutorial

Source code documentation samples provide quick and easy way to add a required functionality into your application. 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 be used to change DPI image resolution using C#.

Fast application programming interfaces of ByteScout Watermarking SDK for C# plus the instruction and the code below will help you quickly learn how to change DPI image resolution. In order to implement the functionality, you should copy and paste this code for C# below into your code editor with your app, compile and run your application. Implementing C# application typically includes multiple stages of the software development so even if the functionality works please test it with your data and the production environment.

Trial version of ByteScout Watermarking SDK is available for free. Source code samples are included to help you with your C# app.

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

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 to override resolution waterMarker.OutputOptions.OverrideResolution = true; // Set vertical resolution waterMarker.OutputOptions.VerticalResolution = 300; // Set horizontal resolution waterMarker.OutputOptions.HorizontalResolution = 300; // 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) or  Web API (on-demand version)



Get 60 Day Free Trial or Visit ByteScout Watermarking SDK Home Page

Explore ByteScout Watermarking SDK Documentation

Get ByteScout Watermarking SDK Free Training


Get Your Free API Key

Explore Web API Documentation