Add Watermark to Images using C#

add watermark to images C#

Watermarks in images are usually used to claim ownership of the content. On the other hand, images are watermarked to avoid unauthorized usage or counterfeiting. In various cases, you may need to automate watermarking feature within your web or desktop applications. For such scenarios, this article covers how to add watermark to images programmatically using C#. This could also be useful when you need to watermark a batch of images in one go. So let’s begin.

C# API to Add Watermark to Images

In order to add watermarks to images, we’ll use Aspose.Imaging for .NET. It is a powerful image processing API that supports a wide range of image formats. Furthermore, the API makes it easier for you to manipulate the images. You can either download binaries of the API or get it installed using NuGet.

PM> Install-Package Aspose.Imaging

Add Watermark to an Image in C#

The following are the steps to add a watermark to an image using C#.

The following code sample shows how to add watermark to an image in C#.

Add watermark to image C#

Add Diagonal Watermark to images in C#

In various cases, watermarks are applied to the images diagonally. For this, Aspose.Imaging for .NET allows you to transform the watermark text on a certain angle. The following are the steps to add a diagonal watermark to an image.

The following code sample shows how to add a diagonal watermark to images using C#.

Add diagonal watermark to image C#

Get a Free API License

In case you want to try the API without evaluation limitations, you can get a free temporary license.

Conclusion

In this article, you have learned how to add watermark to images using C#. Furthermore, you have seen how to transform watermark text to a particular angle. You can explore more about C# image processing API using documentation. In case you would have any questions or queries, contact us via our forum.

See Also