Smart Filters Smart Objects PSD csharp

Smart filters provide a powerful way to perform non-destructive editing on images. They allow you to retain filter settings, which means you can easily adjust or remove filters as needed. In this article, we will explore how to edit, update, and add smart filters such as GaussianBlurSmartFilter and AddNoiseSmartFilter to PSD images programmatically using C#.

Table of Contents

Installing the Aspose.PSD API

To work with PSD images programmatically in C#, you need to install the Aspose.PSD for .NET API. You can quickly download its DLL file from the Downloads section or use the following NuGet installation command in your Visual Studio IDE:

PM> Install-Package Aspose.PSD

Adding, Editing, and Updating Smart Filters in C#

You can manipulate smart filters on smart objects in a PSD file by following these steps:

  1. Load the input PSD image using the Image class.
  2. Access the smart object layer from the input file.
  3. Edit the smart filter by checking properties such as radius, blend mode, and opacity.
  4. Update filter properties and add new smart filters like Gaussian blur or Add Noise.
  5. Save the output file with the updated filters and verify the changes.

The following code snippet demonstrates how to programmatically manipulate PSD smart objects and apply smart filters in C#:

The screenshot below shows the output produced on the console after executing the above code snippet:

Smart Filters Output

For reference, you can also download the input and output files from this link.

Exploring API Features

The Aspose.PSD API offers a range of classes and properties to enhance your experience with PSD and other image formats. For more details, check out the documentation section.

Obtaining a Free Evaluation License

You can evaluate the API without any limitations by requesting a free temporary license. This is a great way to explore the full capabilities of the API, which is available for just $99.

Conclusion

In this article, you learned how to work with smart filters on smart objects in a PSD image using C#. We covered how to edit and update existing smart filters, as well as how to add new filters like GaussianBlurSmartFilter and AddNoiseSmartFilter. Importantly, you do not need to install Photoshop or any other image processing application, as the Aspose.PSD API operates independently. If you have any questions or concerns, feel free to reach out to us on the forum.

See Also

With this guide, you are now equipped to automate PSD workflows with C# smart objects and manipulate PSD smart filters effectively using the .NET framework. Happy coding!