:
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.
On-demand (REST Web API) version:
Web API (on-demand version)
On-premise offline SDK for Windows:
60 Day Free Trial (on-premise)
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);
}
}
}
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
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
Get Your API Key
Explore Web API Docs
Explore Web API Samples
Sorry! This product is not available.
Please click here to visit main page for the list of all available products and solutions.
Product Links: