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, basic image filters are a great inclusion – especially with the availability of high-quality, low-code image filtering APIs to get the job done.

It's become increasingly common place to find a catalogue of image filtering options available when we upload our content to social websites (such as social media, ecommerce, etc.) - yet another testament to the constant democratization of complex technologies in the digital age. Many such filtering services, such as those which allow us to adjust contrast, blur, sharpen, brighten, or even emboss our images, were once only accessible through licensed photo editing applications or widgets limited to desktop use.

Thankfully, you don’t need to write dozens of lines of code to include image filters in your applications; our suite of Image Filtering APIs will allow 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. Below, we’ll take a closer look at three of our eight Image Filtering APIs and their respective benefits.

Gaussian Blur API

The Gaussian Blur filter gets its name from the mathematical function used to model a blur effect's distribution across the pixels in a digital image. 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 become blended with one another to reduce detail, making a once sharply defined pixel matrix appear slightly 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.

Our Gaussian Blur API's request parameters include 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 long-standing practice with roots in physical printing processes. As far back as the 1400's, publishers saw value in making three-dimensional impressions on otherwise flat surfaces; it increased contrast between a subject and its surface, resulting in a pleasant tactile element. To this day, physical embossment is still applied to books, logos, credit cards and business cards, and you might still occasionally notice embossed grooves when drinking from glass soda bottles.

Digital embossment seeks to emulate this centuries-old physical effect by generating contrast in certain areas around the subjects of a photo, which creates the impression that they are raised off a 2-dimensional surface. While online digital images clearly lack a tactile element, this filter helps emulate the enhanced aesthetic which contoured objects provide.

Our Emboss Image API's request parameters include the following:

  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 – more commonly known as black-and-white filtering – is a simple process with a powerful effect.

Digital images store pixels which present a variety of complex hex (color) values, and when we apply a grayscale filter, we simply remove that color information from the equation, expressing visual information in terms of brightness levels instead. This filter creates an iconic moody effect, and it’s often applied 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 overall 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).

For more information on our Image Filter APIs, please feel free to make an inquiry with our sales team.

800 free API calls/month, with no expiration

Get started now! or Sign in with Google

Questions? We'll be your guide.

Contact Sales