Pixaven Blog

New API feature: Image Flipping

New API feature: Image Flipping

Today, we have pushed a quick and simple update to our image processing API - Image Flipping. With that operation you can flip (or mirror) your images horizontally, vertically or both. We have also updated all our official integrations so you can make use of image flipping right away.

A newly introduced top-level flip hash takes two, self explanatory, boolean parameters: horizontal and vertical:

{
    "flip": {
        "horizontal": true,
        "vertical": true
    }
}

Here’s a quick example of image flipping from within our Node integration:

const Pixaven = require("pixaven");

/**
* Instantiate `pix`
*/

const pix = new Pixaven("your-api-key");

/**
* Provide a publicly available image URL with fetch(string) method
* and flip the image horizontally
*/

pix
    .fetch("https://www.website.com/image.jpg")
    .flip({
        horizontal: true
    })
    .toJSON((err, meta) => {
        if (err) {
            return console.log(err);
        }
    });

Have questions about using image flipping or requests for other features? Do not hesitate to contact us anytime.

About the author

Przemek Matylla is the Founder and CEO of Pixaven currently living in Berlin. You can follow him on Twitter or connect with him on LinkedIn.