Guide for C#
Core Document Formats
Additional Features
Create Watermark

C# Imaging - Add Watermark to Image in C#.NET

Comprehensive C# Codes for Drawing Watermark on Image in .NET Imaging SDK

Visual C#
Home > .NET Imaging SDK > C# > Create Watermark
If this is your first time to use our DocImageSDK, we strongly suggest you reading How to Start first!

C# Image Watermark Creating Overview
Our .NET image processing management system allows developers and end users to add and create watermark on target image in C# class project. This C# Image Watermark Add-on library empowers users with the huge capabilities to draw, save and print watermark on specific image format as a highlight or confidential mark.
Main information modules of image watermark adding function article:
  • Function overview of creating watermark to image in C# project
  • How to start a Windows application for adding watermark function on image in C#
  • Comprehensive methods and sample codes for adding image watermark within C# application
Image Watermark Adding Benefit Tips in C#
  • Combine this C# image watermark adding functionality within your operating applications
  • Support creating watermark on all supported image formats, like JPEG, PNG, BMP, GIF and TIFF
  • Create and customize image watermark with full managed C# sample code
  • Flexible methods to add watermark to any designed area of the image page in C# library
  • Easy to resize watermark by using .NET image resizing component in C#
  • Simply and quickly save the created watermark image to local file as your needs
How to Add Watermark on Image in C#
We will demonstrate how to add watermark on image in C# from following steps:
  • Firstly, create a proper and compliant Windows program in C# class
  • And then use the given methods and sample codes to create and customize image watermark in this C# Windows application
  • More C#.NET image operations by using .NET Imaging Processing SDK

Start and Run Watermark Adding Project in C#

This part mainly provides C#.NET developers with detailed guide on opening and running a C# application for adding watermark on image. Specific tips are listed below. (For VB.NET developers, please go to add watermark to images in VB.NET. Want to use image and document watermark function in WinForms or web application, please go to add watermark to images in WinForms or web document images watermark adding.)
  1. Start your Visual Studio 2005 or any greater version;
  2. Create a Windows application in Visual C# programming language;
  3. Copy your RasterEdge license text to the "bin" file of the created C# Windows application folder;
  4. Embed following .NET imaging libraries to C#.NET class project;
    • RasterEdge.Imaging.Basic.dll
    • RasterEdge.Imaging.Processing.dll
  5. Run following using namespace within C# project:
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;

Method to Add Watermark on C# Project Image

As you can see from following image watermark adding method, using this C# imaging library, you are able to create and customize the image watermark by setting the font style, changing the brush color & opacity and adjusting watermark width & height in C# project.
public void CreateWatermark(string s, Font font, Brush brush, PointF point);

C# Demo Code for Adding Watermark on Image

Both developers and end users can use following C# demo code directly in your C# applications for image watermark creating.
using System.IO;
using System.Drawing.Printing;
using RasterEdge.Imaging;
using RasterEdge.Imaging.Processing;
RasterEdgeImaging Image = new RasterEdgeImaging();

//Create an instance of Image and load an existing image
using (Image image= Image.LoadImageFromFile(@"C:\1.bmp"));
{
Graphics graphics = new Graphics(image);
RasterEdgeImaging.Font font = new RasterEdgeImaging.Font("Times New Roman", 16, FontStyle.Bold);
RasterEdgeImaging.Brushes.SolidBrush brush=new RasterEdgeImaging.Brushes.SolidBrush();
brush.Color=Color.Black;
brush.Opacity=100;
image.CreateWatermark("watermark", font, brush, new PointF(image.Width/2, image.Height/2));
image.Save(@"C:\1-watermark.bmp");
}

More C#.NET Image Processing Functionalities

Within .NET Imaging Processing SDK, users are capable of using its excellent functionalities in C#.NET, VB.NET, web ASP and .NET Windows Forms platforms. Specific processing operations are: resizing, rotating, adjusting brightness and contrast, region of interest (ROI) support for primary shapes, most complete color space support, powerful and reliable color reduction products, image encryption decryption, and even more. Please check this link for the overall image processing guide in C# class.


Recommend this to Google+