API Documentation

Crop Image API Documentation



Manipulate and transform images and photos in real time with our easy to use APIs.

Introduction :
Crop your photos and images by defining four coordinates: the new height and width pixels and the x and y positions. JPG, PNG, BMP, TIFF or GIF


Example : Crop images to 90×60 starting at 30×30 from the top left
https://studio.pixelixe.com/api/crop/v1?apiKey=YOUR_API_KEY&width=90&height=60&x=30&y=30&imageUrl=https://yoururl.com/image.png 


Original image :
Cropped image :


The API parameters


GET https://studio.pixelixe.com/crop/resize/v1

Parameter Type # Description
apiKey string Required The API Key is the only way to authenticate your application with Pixelixe API. A unique API key is provided after you signup to our API plan.

Ex : ppvkwgDgNRbMbYlCgaM3UyDFPP12
width integer Required Use the width and height parameters (pixel) to choose the new expected dimension of your image. Use "auto" if you want to keep ratio when resizing the width of your image

height integer Required Use the width and height parameters (pixel) to open the Studio with a new blank document sized with those dimensions.

x integer Required Coordinate from the top corner of the image (x co-ordinate of cropping -> pixel).

y integer Required Coordinate from the left corner of the image (y co-ordinate of cropping -> pixel).

imageUrl string Required Set the url of the image you want to crop. (Supported type : jpeg, png, bmp, tiff and gif)

Advice: Use encodeURI when passing the imageUrl as an API parameter.
Ex : https://yourwebsite/yourimage.png
will become
https%3A%2F%2Fyourwebsite%2Fyourimage.png
imageType string Optional Set the image type expected as output of the API between, png, jpeg or bmp. (png by default).



The API output


The API will directly return the cropped image buffer.




You want to transform your photos without API...?


Resize, Flip, Filter, add text, icons, and much more



We created a free online graphic creation tool and image editor to let anyone with no design experience (No account required) :

  • Flip, Rotate, Resize, Crop and transform images
  • Add Instagram like filters
  • Add rich text (From thousands of fonts)
  • Add icons, photos and graphics (From 2.000.000 free photographer's images)