Introduction

Image Operations / Introduction

On this page:
Intro ▾
{{activeSubMenu.text}} ▾

The Pixaven Image API offers blazingly-fast image transformations resulting in unparalleled image quality. We use our proprietary, GPU-optimized rendering pipeline running entirely on the Apple® platform. You can resize, crop, add watermarks and masks to your images and even enhance them automatically with intelligent filters.

Quick Example

Say you'd like to process an image with the Image Upload method (upload an image for processing) and crop-out a portion of the image with a face and give it a nice padding, resize that fragment to a smaller size, automatically enhace the image to give it a more vibrant look and finally apply an elliptical mask on a transparent background using PNG as the output format. With Pixaven Image API you can stack together as many operations and filters as you like.

An example JSON request will look like the following:

{
    "crop": {
        "mode": "face",
        "padding": 50
    },
    "resize": {
        "mode": "auto",
        "width": 150,
        "height": 150
    },
    "auto": {
        "enhance": true
    },
    "mask": {
        "shape": "ellipse"
    },
    "output": {
        "format": "png"
    }
}
Given the input image 750px × 400px
Crop out the face with 50px padding, resize to 150px × 150px, automatically enhance and apply an elliptical mask

An example cURL request incorporating Image Upload method and said transformations would look like so:

curl https://api.pixaven.com/1.0/upload -u your-api-key: \
-F file=@/path/to/image/file.jpg \
-F data='{
    "crop": {
        "mode": "face",
        "padding": 50
    },
    "resize": {
        "mode": "auto",
        "width": 150,
        "height": 150
    },
    "auto": {
        "enhance": true
    },
    "mask": {
        "shape": "ellipse"
    },
    "output": {
        "format": "png"
    }
}'

We use both proprietary and third-party cookies to improve your browsing experience and to provide you with a better service. By continuing to use this site you consent our use of cookies as described in our Cookie Policy×