In this step by step tutorial, you’ll learn how to add image watermark to PSD in C#. When you watermark PSD file, you make it harder for the counterfeiters to create an illegal copy of the document.
Steps to Add Image Watermark to PSD in C#
- Install Aspose.PSD for .NET package from NuGet.org
- Use the required namespaces to make the code work
- Set license of Aspose.PSD for .NET API using SetLicense method
- Load input PSD file into PsdImage object object using Image class
- Create a base Layer object using an image from FileStream
- Add base layer object to the PSD image object created above
- Load watermark image into a Layer object
- Draw watermark image on the base layer
- Save the final watermarked PSD file as an output
As you can see, it’s quick and easy to watermark PSD file using Aspose.PSD for .NET. It does not require you to have Photoshop installed on your system. And the code given below, can be used to add watermark feature in your applications.
Code to Add Image Watermark to PSD in C#
In this sample, you learned the steps to add image watermark to PSD in C#. However, in the similar way, you can also add text watermark to PSD in C# code. We’ll add those steps in a separate how to topic. This C# code can be used with any kind of .NET applications be it ASP.NET web applications, Windows applications, or Services etc.