Blog

Find out about the latest from Cloudmersive.

API Spotlight: Easy Photo Filter APIs
1/3/2023 - Brian O'Neill


On websites where images are frequently uploaded, image filters are a logical inclusion – especially with the availability of simple, high-quality image filtering services.

For more than a decade, it’s become increasingly common place to find a variety of image customization options available on websites (such as social media, ecommerce, etc.). These filters help us easily manipulate photo uploads, quickly shaping them into a unique final product. The growing availability of digital filters is a testament to the near constant democratization of technology in the digital age; many such filtering services, such as those offering us the ability to adjust contrast, blur, sharpen, brighten, or even emboss our content, were once only accessible through expensive (or free but overly complex) photo editing applications.

Thankfully, you don’t need to write dozens of lines of code to partake in this ongoing trend. Our suite of Image Filtering APIs allows you to easily build a variety of simple photo filtering services into any application using only a few lines of ready-to-run, copy & paste code examples. These APIs are also readily available for use on a variety of enterprise automation platforms, including Power Automate, MuleSoft, and more. Below, we’ll take a closer look at three of our eight Image Filtering APIs and the various visual effects they provide, as well as the parameters required in their respective request bodies.

Gaussian Blur API

The Gaussian Blur filter gets its name from the mathematical function used to model its distribution across the pixels in a digital image. Complex formulas aside, the outcome of a Gaussian Blur is a simple effect that we’re quite used to seeing in online images: certain areas within an image are blended with one another to reduce detail, making a once sharply defined pixel matrix appear out of focus instead. There are a variety of useful applications of this filter, and perhaps the most common among those is to reduce noise (random variations) in an image. Performing a Gaussian Blur is also a great step to take before overlaying text on top of a photo, as it will increase the contrast between the text and the photo, making the text easier to read.

This Gaussian Blur API requires several request parameters to be satisfied, including the following:

  1. imageFile – the image file to perform the operation on (common formats like JPEG, PNG supported)
  2. radius – the intended radius of the blur operation (higher integers result in a larger blur effect)
  3. sigma – the variance of the blur operation (higher integers result in a more greatly varied blur effect, directly impacting the Gaussian function used to generate the filter)

Embossment API

Embossment is a practice rooted in physical printing processes. Dating back to the 15th century, publishers saw value in making three-dimensional impressions on otherwise flat surfaces, increasing contrast between a subject and its surface to add a pleasant tactile element; to this day, physical embossment is still applied to various books, logos, credit cards and business cards. Digital embossment seeks to emulate this centuries-old physical effect, generating contrast in various areas around the various subjects of a photo, and thus giving the impression that they are raised off a 2-dimensional surface. While online digital images clearly lack any tactile potential, this filter can still promote the enhanced aesthetic which seemingly contoured objects provide.

The Emboss Image API requires that several parameters – much like those used in the Gaussian Blur filter – be satisfied before making an API call:

  1. imageFile – the file to perform the operation on (common formats like JPEG, PNG are supported)
  2. radius – the radius of the embossment operation (expressed in pixels; higher integers result in a greater embossment effect)
  3. sigma – the variance of the embossment operation (higher integers result in a more varied embossment effect)

Grayscale API

Where color can’t adequately distinguish the finer details of a photograph, grayscale often can. Grayscale filtering – otherwise known as black-and-white filtering – is a simple process with a powerful effect. Digital images store pixels representing a variety of complex hex values; when we apply a grayscale filter, we simply remove that color information from the equation and express visual information in terms of brightness instead. This filter creates an unmistakably moody effect, and it’s often used to draw our eyes to certain areas of an image (especially darker areas) which may not have initially attracted our attention. It also serves the practical purpose of reducing the size of an image, which makes that image easier to process (in operations such as Optical Character Recognition, for example) and store efficiently.

The Grayscale API only requires the input image in its request parameters (common formats like JPEG, PNG are supported).

800 free API calls/month, with no expiration

Get started now! or Sign in with Google

Questions? We'll be your guide.

Contact Sales