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 in C#. This could also be useful when you need to watermark a batch of images in one go. So let’s begin.

Add Watermark to Images in C# - API Installation

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 a watermark to an image in C#.

Add watermark to image C#

C# Add Diagonal Watermark to Images

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#

Insert Watermark on Images with a Free License

You can get a free temporary license and insert a watermark on images without evaluation limitations.

Conclusion

In this article, you have learned how to add a watermark to images in 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