Automating image manipulation with ImageProcessor

Guilherme Müller
1 min readApr 20, 2020

ImageProcessor is a great C# Library for manipulating images and applying effects on the fly. It can run on the .NET Framework or .NET Core, it’s lightweight and performative. In this article, I’ll share a little bit about how to use it to automate image manipulation on a scale for web assets.

This is a story about the implementation of a tool for automation of the process of merging images to create brand assets and generating multiple versions of it, you can find examples of its real use here. The process was straight forward: take a background image, take a foreground image, merge them and generate X different colored versions for them to be used on the web. At the same time, sometimes, you will not have a background or foreground image and the tool must adapt.

Above, an exemplification of the process that needed to be automated by the solution. (Icons by FlatIcon)

To do this, ImageProcessor was a handy solution that allowed for a simplified implementation utilizing a strategy pattern to allow for multiple outputs based on what files the provided asset had. A library was created to allow flexibility between the implementation and the applications that would use it.

A sample project is available at https://github.com/gmullernh/ImageMerger

--

--

Guilherme Müller

A Brazilian software developer and devops engineer, who also likes communication and research.